From 9a87ae1f0d8ebf2b9535e9e41a9c0abd1eba359d Mon Sep 17 00:00:00 2001 From: Loïc Collignon Date: Fri, 17 Mar 2017 23:29:11 +0100 Subject: fixed CMakeLists.txt when used whith a 3.0 version of cmake. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Loïc Collignon --- CMakeLists.txt | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) mode change 100755 => 100644 CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt old mode 100755 new mode 100644 index f7e999e..7fdf8f4 --- 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}) -- cgit 1.2.3-korg