From: Loïc Collignon Date: Fri, 17 Mar 2017 22:29:11 +0000 (+0100) Subject: fixed CMakeLists.txt when used whith a 3.0 version of cmake. X-Git-Tag: 5.0.2~345^2~9 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=9a87ae1f0d8ebf2b9535e9e41a9c0abd1eba359d;p=apps%2Fagl-service-can-low-level.git fixed CMakeLists.txt when used whith a 3.0 version of cmake. Signed-off-by: Loïc Collignon --- diff --git a/CMakeLists.txt b/CMakeLists.txt old mode 100755 new mode 100644 index f7e999eb..7fdf8f43 --- 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})