]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
[cmake] assign CMAKE_CXX_FLAGS as a string instead of a list 44/head
authorThomas Debesse <dev@illwieckz.net>
Sun, 9 Jul 2017 20:01:46 +0000 (22:01 +0200)
committerThomas Debesse <dev@illwieckz.net>
Sun, 9 Jul 2017 20:06:26 +0000 (22:06 +0200)
- fix command line -DCMAKE_CXX_FLAGS expansion

spotted by !43

CMakeLists.txt

index 742fd059218ce88457af8d9ecba28c29a70a6624..dda42c76e15f5f3a1c6bd4a8b2d7bdb43495c161 100644 (file)
@@ -48,7 +48,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR CMAKE_COMPILER_IS_GNUCXX)
     include(CheckCXXCompilerFlag)
     check_cxx_compiler_flag(--std=c++${CMAKE_CXX_STANDARD} STD_CXX)
     if (STD_CXX)
-        list(APPEND CMAKE_CXX_FLAGS --std=c++${CMAKE_CXX_STANDARD})
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++${CMAKE_CXX_STANDARD}")
     else ()
         message(SEND_ERROR "Requires C++${CMAKE_CXX_STANDARD} or better")
     endif ()