summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2014-03-12 04:11:31 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2014-03-12 04:11:31 +0000
commiteb547816ea2f8d75074208a8d5a479c4593a393e (patch)
tree9b37e541488f751d5b44367301ecd56e2a3a0843
parent89a52ffd543e3325d236aa876259c6bea8906474 (diff)
downloadlibcxx_35a-eb547816ea2f8d75074208a8d5a479c4593a393e.tar.gz
build: fix erroneous overwriting of flags
Always use list(APPEND) as it will perform the desired action even if the list is empty or previously unset. The first set is harmless, however, the subsequent set was overwriting the previous flag setup resulting in an improper compilation command being generated. This manifested as a build failure on Linux when using cmake + ninja. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@203638 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 677abaa6..dd36b616 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -180,7 +180,7 @@ if (MSVC)
# headers.
else()
if (LIBCXX_HAS_NOSTDINCXX_FLAG)
- set(LIBCXX_CXX_REQUIRED_FLAGS -nostdinc++)
+ list(APPEND LIBCXX_CXX_REQUIRED_FLAGS -nostdinc++)
endif()
if (LIBCXX_ENABLE_CXX0X AND LIBCXX_HAS_STDCXX0X_FLAG)
list(APPEND LIBCXX_CXX_REQUIRED_FLAGS -std=c++0x)
@@ -196,7 +196,7 @@ endmacro()
# Get warning flags
if (NOT MSVC)
append_if(LIBCXX_CXX_WARNING_FLAGS LIBCXX_HAS_WALL_FLAG -Wall)
- set(LIBCXX_CXX_REQUIRED_FLAGS -Werror=return-type)
+ list(APPEND LIBCXX_CXX_REQUIRED_FLAGS -Werror=return-type)
endif()
append_if(LIBCXX_CXX_WARNING_FLAGS LIBCXX_HAS_W_FLAG -W)