From c0a9c67632fa47c16679c3d94cb363676994f9cb Mon Sep 17 00:00:00 2001 From: bubnikv Date: Mon, 28 Aug 2017 23:17:24 +0200 Subject: [PATCH] CMake build system: Fix on older linux? --- xs/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xs/CMakeLists.txt b/xs/CMakeLists.txt index 68f061f25..4d6712027 100644 --- a/xs/CMakeLists.txt +++ b/xs/CMakeLists.txt @@ -5,9 +5,9 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) # Add our own cmake module path. list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/modules/) -if (UNIX) +if (CMAKE_SYSTEM_NAME STREQUAL "Linux") # Workaround for an old CMake, which does not understand CMAKE_CXX_STANDARD. - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall") + add_compile_options(-std=c++11 -Wall) endif() # Where all the bundled libraries reside?