CMake style corrections
This commit is contained in:
parent
5fdb0e6227
commit
1cc6b0c9ef
@ -25,24 +25,24 @@ endif(NOT CMAKE_BUILD_TYPE)
|
||||
|
||||
# detect system type
|
||||
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")
|
||||
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" )
|
||||
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
||||
set(METER_SOURCES "osx/memory.cc" "osx/cpu.cc" "osx/load.cc")
|
||||
elseif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
||||
# FreeBSD STUFF HERE
|
||||
message( "FreeBSD detected")
|
||||
message("FreeBSD detected")
|
||||
message( WARNING "FreeBSD is still experimental!" )
|
||||
SET( METER_SOURCES "bsd/memory_freebsd.cc" "bsd/cpu.cc" "bsd/load.cc" )
|
||||
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
|
||||
set( METER_SOURCES "bsd/memory_freebsd.cc" "bsd/cpu.cc" "bsd/load.cc" )
|
||||
elseif(CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
|
||||
# OpenBSD Stuff Here
|
||||
message( "OpenBSD detected")
|
||||
message( FATAL_ERROR "OpenBSD is not supported! See bsd/openBSD.txt for more
|
||||
info" )
|
||||
SET( METER_SOURCES "bsd/memory_openbsd.cc" "bsd/cpu.cc" "bsd/load.cc" )
|
||||
ELSE()
|
||||
set( METER_SOURCES "bsd/memory_openbsd.cc" "bsd/cpu.cc" "bsd/load.cc" )
|
||||
else()
|
||||
message( FATAL_ERROR "Cannot be compiled on this system" )
|
||||
endif()
|
||||
|
||||
@ -54,20 +54,20 @@ if (CMAKE_COMPILER_IS_GNUCC)
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
|
||||
OUTPUT_VARIABLE GCC_VERSION)
|
||||
if (GCC_VERSION VERSION_EQUAL 4.6)
|
||||
SET( GCC_COVERAGE_COMPILE_FLAGS "-std=c++0x " )
|
||||
set( GCC_COVERAGE_COMPILE_FLAGS "-std=c++0x " )
|
||||
elseif (GCC_VERSION GREATER 4.6)
|
||||
SET( GCC_COVERAGE_COMPILE_FLAGS "-std=c++11 " )
|
||||
set( GCC_COVERAGE_COMPILE_FLAGS "-std=c++11 " )
|
||||
else()
|
||||
message( FATAL_ERROR "You need gcc version >= 4.6")
|
||||
endif()
|
||||
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
SET( GCC_COVERAGE_COMPILE_FLAGS "-std=c++11 " )
|
||||
set( GCC_COVERAGE_COMPILE_FLAGS "-std=c++11 " )
|
||||
else()
|
||||
message( WARNING "Untested compiler detected. You may need to set c++11
|
||||
support manually through CMakeList.txt file")
|
||||
SET( GCC_COVERAGE_COMPILE_FLAGS "" )
|
||||
set( GCC_COVERAGE_COMPILE_FLAGS "" )
|
||||
endif()
|
||||
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}" )
|
||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}" )
|
||||
|
||||
# add binary tree so we find version.h
|
||||
include_directories("${PROJECT_BINARY_DIR}" )
|
||||
|
Loading…
Reference in New Issue
Block a user