Commit Graph

28 Commits

Author SHA1 Message Date
Pawel "l0ner" Soltys
ae5c71441b FreeBSD and OpenBSD ports
- Removed OpenBSD stuff from freebsd port
- Renamed bsd folder to freebsd since now it contains only
  freebsd-relevant files.
- Changed CMake instructions to account for bsd port changes
- modified main source file to account for openbsd port
2015-01-19 23:57:53 +01:00
Pawel "l0ner" Soltys
ec6b1c6cc7 remove leftover argParse.cc reference from CMakeList.txt 2015-01-19 17:55:29 +01:00
Pawel "l0ner" Soltys
eb338d92c5 rename config.h back to version.h since it contains only version after last commit 2015-01-18 20:04:28 +01:00
Pawel "l0ner" Soltys
d3eb9e3187 use macros from config.h to calculate megabyes
instead of using hard coded divisions to calculate ram stats it's better to use
macros defined in config.h. BSD port was doing this already, using macros
defined in it's common.h header. I pulled those macros out and applied them to
all platforms.
File version.h.in got renamed into config.h.in since it doesn't caontain only
the version anymore.
2015-01-18 17:21:19 +01:00
Pawel "l0ner" Soltys
b2084ea3b3 better c++11 detection
2cc9efb187 (commitcomment-9327965)

Instead of checking for compiler version or whether it supports c++ features
through target_compile_features test whether compiler supports one of the c++11
flags (-std=c++11 or -std=c++0x). Cleaner and simplier code. And we can make it
fail loudly if comiler does not support c++11
2015-01-18 16:59:19 +01:00
Pawel "l0ner" Soltys
ae4e160ede added test case for graph_lines = 0 2015-01-18 15:07:11 +01:00
Pawel "l0ner" Soltys
89a4b0c048 version defines prefixed with name, full version
now the version variables will be prefixed with 'tmux-mem-cpu-load'. This way we
won't clash with any future dependency that might redefine those variables.
This is exactly how CMake does it in their code, see:

f3e92d2816/Source/CMakeVersion.cmake
6ae98ee18f/Source/cmVersionConfig.h.in
6ae98ee18f/Source/CMakeVersionCompute.cmake

the only difference is that they have functions that return the versions and I
use those variables directly.

6ae98ee18f/Source/cmVersion.cxx

Since the partial version variables are not used anywhere in the code we might
as well remove them from version.h.in. I've deciced to leave them for now, since
we might need them in the future.
2015-01-18 15:04:09 +01:00
Pawel "l0ner" Soltys
51f85ba032 code syntax style, vim modelines, license
* Use std::sting instead of char[] in the graph drawing functions. This is the
  only change to the code. Rest is just styling.
* Corrected whole code to follow Allman/GNU coding style, with 2 spaces for each
  indentation step.
* Added license headers to all code files
* Added vim modelines to all files. They sit on the first line and enable the
  following settings: 2 space indentation, tab expansion to spaces, line at
  80th column, automatic line breaking on "\ !@*+-;:,./?" characters, automatic
  line break if line exceeds 80 colums. This should keep the code nice and tidy.
2015-01-18 14:36:59 +01:00
Pawel "l0ner" Soltys
1cc6b0c9ef CMake style corrections 2015-01-17 23:23:21 +01:00
Pawel "l0ner" Soltys
acaf9b0b2b fixed typo in CMakeLists.txt 2015-01-17 16:46:33 +01:00
Pawel "l0ner" Soltys
2cc9efb187 added compiler (and it's version) detection
This should fix problems with different flags for c++11 across different gcc
versions. Should compile on Clang and gcc >= 4.6. Lower versions of gcc are
untested. I don't even know wheteher they support c++11 (gcc 4.2.1 on OpenBSD
5.7 does not).
2015-01-17 16:30:31 +01:00
Pawel "l0ner" Soltys
8264c6e2a2 drop OpenBSD support. See bsd/openBSD.txt for info 2015-01-12 15:21:43 +01:00
Pawel "l0ner" Soltys
f59b11971f *BDS port:
- split *BDS files
- add CMake confingure instructions on bsd systems
- add includes to main file
2015-01-10 18:34:37 +01:00
Pawel "l0ner" Soltys
5001bc4fe7 added custom interval test 2015-01-08 20:04:27 +01:00
Pawel "l0ner" Soltys
aadca0d325 cleanups, fix tests to follow new arguments 2015-01-08 19:52:46 +01:00
Pawel "l0ner" Soltys
28040b61da easier to read argv parse using command line argument parser by Michael Hanke 2015-01-07 20:57:25 +01:00
Pawel "l0ner" Soltys
72f1b03078 shorter DEFINES for versioning 2015-01-07 14:31:49 +01:00
Pawel "l0ner" Soltys
42c93ac397 prune BOOST detection, minor tweaks
For not Boost is not needed, uncomment relative lines when it will be.
2015-01-07 14:15:28 +01:00
l0ner
2040736dd6 CPU usage graph generation by getGraphByPercentage function. 2014-04-19 22:36:59 +00:00
l0ner
643fef3a7c Corrections in CMakeLists.txt 2014-04-14 20:51:46 +02:00
Matt McCormick
a7200d2364 Change the default build type to MinSizeRel.
This changes the output size of the executable from 52K to 32K for GCC 4.6.3.
2013-07-15 23:23:11 +00:00
Matt McCormick
e5f3dc1503 Add tests. 2013-06-09 22:50:03 -04:00
Matt McCormick
777452a83e Merge remote-tracking branch 'Justastic/master' #1, #2, #5
Add support for Mac OSX from Justastic.  Refactors the code from Justastic so it
works with the Linux code and so it also works for the new colors support.

Still need to test on OSX.

Conflicts:
	tmux-mem-cpu-load.cpp
2013-06-09 20:49:21 -04:00
Matt McCormick
b2f26bab3f Add support for colors.
Colors are added for terminals that have 256 color support when the
--colors flag is enabled.  The background colors are varied with different color
maps derived from their matplotlib versions.  The foreground color is a
contrasting black or white.
2013-04-30 06:38:39 -04:00
Justin Crawford
86bdac97f8 Don't use namespace std. It makes things too confusing. 2013-04-15 11:33:28 -07:00
Matt McCormick
ec28a5615b Add CMake error on OSX.
It is not currently supported.
2013-04-04 19:50:16 -04:00
Matt McCormick (thewtex)
dc5fe29f1d rename screen-cpu-mem to tmux-mem-cpu-load 2010-02-24 18:04:41 -06:00
Matt McCormick (thewtex)
011e3abe69 add cmake configuration 2009-09-09 01:51:47 -05:00