aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--[-rwxr-xr-x]CMakeLists.txt14
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})