diff options
author | Howard Hinnant <hhinnant@apple.com> | 2012-08-05 17:37:39 +0000 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2012-08-05 17:37:39 +0000 |
commit | 73984be05773e353fb0a87b63c1fc4a8b0f23a06 (patch) | |
tree | 701472e6d907bed31da19f4ede75a044b4acadf2 /libcxx | |
parent | 812005e562c6bbcc1d679e3f2bc74a5c5307f086 (diff) | |
download | bcm5719-llvm-73984be05773e353fb0a87b63c1fc4a8b0f23a06.tar.gz bcm5719-llvm-73984be05773e353fb0a87b63c1fc4a8b0f23a06.zip |
Andrew Morrow: The current CMake setup for libc++ incorrectly uses the variable
LLVM_ENABLE_ASSERTIONS instead of LIBCXX_ENABLE_ASSERTIONS when
figuring out what _DEBUG/NDEBUG defines to set. It also tries to test
the non-existent variable 'uppercase_CMAKE_BUILD_TYPE', which the top
level LLVM CMakeLists.txt sets up, but which the top level libc++
CMakeLists.txt currently does not. Changing the variable name tested
and creating the uppercase release name variable allows libc++ to
honor the LIBCXX_ENABLE_ASSERTIONS option correctly.
llvm-svn: 161308
Diffstat (limited to 'libcxx')
-rw-r--r-- | libcxx/CMakeLists.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt index 00ea4851782..ca8ad57d6c4 100644 --- a/libcxx/CMakeLists.txt +++ b/libcxx/CMakeLists.txt @@ -119,7 +119,8 @@ if (NOT LIBCXX_ENABLE_RTTI) append_if(LIBCXX_CXX_FEATURE_FLAGS LIBCXX_HAS_FNO_RTTI_FLAG -fno-rtti) endif() # Assert -if (LLVM_ENABLE_ASSERTIONS) +string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE) +if (LIBCXX_ENABLE_ASSERTIONS) # MSVC doesn't like _DEBUG on release builds. See PR 4379. if (NOT MSVC) list(APPEND LIBCXX_CXX_FEATURE_FLAGS -D_DEBUG) |