From 42c93ac397d495b51a0e401e33415760c60296b7 Mon Sep 17 00:00:00 2001 From: "Pawel \"l0ner\" Soltys" Date: Wed, 7 Jan 2015 14:15:28 +0100 Subject: [PATCH] prune BOOST detection, minor tweaks For not Boost is not needed, uncomment relative lines when it will be. --- CMakeLists.txt | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 645b162..d877628 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,35 +25,38 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux") message( "Linux detected") SET( METER_SOURCES "linux/memory.cc" "linux/cpu.cc" "linux/load.cc" ) ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Darwin") + # Mac OS X source setting will go here message( "Darwin detected") SET( METER_SOURCES "osx/memory.cc" "osx/cpu.cc" "osx/load.cc" ) -# Mac OS X source setting will go here ELSEIF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") + # FreeBSD STUFF HERE message( "FreeBSD detected") -# FreeBSD STUFF HERE + message( FATAL_ERROR "Free BSD is not supported yet" ) ELSEIF(CMAKE_SYSTEM_NAME MATCHES "OpenBSD") + # OpenBSD Stuff Here message( "OpenBSD detected") -# OpenBSD Stuff Here -ELSE(CMAKE_SYSTEM_NAME MATCHES "Linux") + message( FATAL_ERROR "OpenBSD is not supported yet" ) +ELSE() message( FATAL_ERROR "Cannot be compiled on this system" ) endif() # Search for boost # will be needed later -set(Boost_USE_STATIC_LIBS OFF) -set(Boost_USE_MULTITHREADED ON) -set(Boost_SUE_STATIC_RUTIME OFF) -find_package(Boost 1.52.0 REQUIRED COMPONENTS filesystem program_options system) +#set(Boost_USE_STATIC_LIBS OFF) +#set(Boost_USE_MULTITHREADED ON) +#set(Boost_SUE_STATIC_RUTIME OFF) +#find_package(Boost 1.52.0 REQUIRED COMPONENTS filesystem program_options system) # compiler flags SET( GCC_COVERAGE_COMPILE_FLAGS "-std=c++11 " ) SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}" ) # add binary tree so we find version.h +#include_directories("${PROJECT_BINARY_DIR}" ${Boost_INCLUDE_DIRS}) include_directories("${PROJECT_BINARY_DIR}" ${Boost_INCLUDE_DIRS}) add_executable(tmux-mem-cpu-load tmux-mem-cpu-load.cpp graph.cc ${METER_SOURCES}) -target_link_libraries(tmux-mem-cpu-load ${Boost_LIBRARIES}) +#target_link_libraries(tmux-mem-cpu-load ${Boost_LIBRARIES}) install(TARGETS tmux-mem-cpu-load RUNTIME DESTINATION bin )