diff options
author | Loïc Collignon <loic.collignon@iot.bzh> | 2017-03-17 23:29:11 +0100 |
---|---|---|
committer | Loïc Collignon <loic.collignon@iot.bzh> | 2017-03-17 23:29:11 +0100 |
commit | 9a87ae1f0d8ebf2b9535e9e41a9c0abd1eba359d (patch) | |
tree | f407c159e8cea8ecdef4bd383bcbf3773e65a076 | |
parent | cbc227941e8f65bf9e1a2cc8a178792a8462be18 (diff) |
fixed CMakeLists.txt when used whith a 3.0 version of cmake.
Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
-rw-r--r--[-rwxr-xr-x] | CMakeLists.txt | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f7e999eb..7fdf8f43 100755..100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,11 +1,19 @@ cmake_minimum_required(VERSION 3.0)
project(can-config-generator)
+if (CMAKE_VERSION VERSION_LESS "3.1")
+ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+ set (CMAKE_CXX_FLAGS "--std=gnu++11 ${CMAKE_CXX_FLAGS}")
+ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+ set (CMAKE_CXX_FLAGS "--std=c++11 ${CMAKE_CXX_FLAGS}")
+ endif ()
+else ()
+ set (CMAKE_CXX_STANDARD 11)
+endif ()
+
include_directories(SYSTEM 3rdparty/json)
-#add_definitions( -DBOOST_ALL_NO_LIB )
-#set(Boost_USE_STATIC_LIBS ON)
-find_package(Boost REQUIRED COMPONENTS program_options filesystem)
+find_package(Boost REQUIRED COMPONENTS program_options filesystem system)
if(Boost_FOUND)
add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
|