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?