From 46f985d7632f3599d5ae29f046f39dc3fb5b4dae Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 24 Feb 2019 14:35:18 +0100 Subject: [PATCH] Fix for CMake < 3.1 --- CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d6be231f..c988a8003 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -420,23 +420,23 @@ if(NOT (CMAKE_VERSION VERSION_LESS "3.1")) else() if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32) if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.1.1") - add_compile_options(-std=c++11) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") else() - add_compile_options(-std=c++14) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") endif() endif() if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") if(OS_IS_MACOSX) if(CLANG_VERSION VERSION_LESS "600") - add_compile_options(-std=c++11) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") else() - add_compile_options(-std=c++14) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") endif() else() if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.5.0") - add_compile_options(-std=c++11) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") else() - add_compile_options(-std=c++14) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") endif() endif() endif()