More consistent spacing in CMakeLists.txt.

This commit is contained in:
Matt McCormick 2015-01-19 21:54:35 -05:00
parent 87a92fa108
commit 17dbdfe9ea

@ -65,51 +65,58 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
set(METER_SOURCES "osx/memory.cc" "osx/cpu.cc" "osx/load.cc") set(METER_SOURCES "osx/memory.cc" "osx/cpu.cc" "osx/load.cc")
elseif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") elseif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
message("FreeBSD detected") message("FreeBSD detected")
message( WARNING "FreeBSD is still experimental!" ) message(WARNING "FreeBSD is still experimental!")
set( METER_SOURCES "bsd/memory_freebsd.cc" "bsd/cpu.cc" "bsd/load.cc" ) set(METER_SOURCES "bsd/memory_freebsd.cc" "bsd/cpu.cc" "bsd/load.cc")
elseif(CMAKE_SYSTEM_NAME MATCHES "OpenBSD") elseif(CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
message(STATUS "OpenBSD detected") message(STATUS "OpenBSD detected")
message( FATAL_ERROR "OpenBSD is not supported! See bsd/openBSD.txt for more message(FATAL_ERROR
info" ) "OpenBSD is not supported! See bsd/openBSD.txt for more info")
set( METER_SOURCES "bsd/memory_openbsd.cc" "bsd/cpu.cc" "bsd/load.cc" ) set(METER_SOURCES "bsd/memory_openbsd.cc" "bsd/cpu.cc" "bsd/load.cc")
else() else()
message( FATAL_ERROR "Cannot be compiled on this system" ) message(FATAL_ERROR "Cannot be compiled on this system" )
endif() endif()
# set common source files # set common source files
set( COMMON_SOURCES "tmux-mem-cpu-load.cpp" "graph.cc" ) set(COMMON_SOURCES "tmux-mem-cpu-load.cpp" "graph.cc")
# add binary tree so we find version.h # add binary tree so we find version.h
include_directories("${PROJECT_BINARY_DIR}" ) include_directories("${PROJECT_BINARY_DIR}")
add_executable(tmux-mem-cpu-load ${COMMON_SOURCES} ${METER_SOURCES}) add_executable(tmux-mem-cpu-load ${COMMON_SOURCES} ${METER_SOURCES})
install(TARGETS tmux-mem-cpu-load RUNTIME DESTINATION bin) install(TARGETS tmux-mem-cpu-load RUNTIME DESTINATION bin)
include( CTest ) include(CTest)
if( BUILD_TESTING ) if(BUILD_TESTING)
add_test( NAME usage add_test(NAME usage
COMMAND tmux-mem-cpu-load -h ) COMMAND tmux-mem-cpu-load -h
)
add_test( NAME no_arguments add_test(NAME no_arguments
COMMAND tmux-mem-cpu-load ) COMMAND tmux-mem-cpu-load
)
add_test( NAME custom_interval add_test(NAME custom_interval
COMMAND tmux-mem-cpu-load -i 3 ) COMMAND tmux-mem-cpu-load -i 3
)
add_test( NAME no_cpu_graph add_test(NAME no_cpu_graph
COMMAND tmux-mem-cpu-load -g 0 ) COMMAND tmux-mem-cpu-load -g 0
)
add_test( NAME colors add_test(NAME colors
COMMAND tmux-mem-cpu-load --colors ) COMMAND tmux-mem-cpu-load --colors
)
add_test( NAME invalid_status_interval add_test(NAME invalid_status_interval
COMMAND tmux-mem-cpu-load -i -1 ) COMMAND tmux-mem-cpu-load -i -1
)
add_test( NAME invalid_graph_lines add_test(NAME invalid_graph_lines
COMMAND tmux-mem-cpu-load --graph_lines -2 ) COMMAND tmux-mem-cpu-load --graph_lines -2
)
set_tests_properties( usage set_tests_properties(usage
invalid_status_interval invalid_status_interval
invalid_graph_lines invalid_graph_lines
PROPERTIES WILL_FAIL TRUE ) PROPERTIES WILL_FAIL TRUE)
endif() endif()