diff options
author | Andrew Trick <atrick@apple.com> | 2011-06-16 22:19:20 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2011-06-16 22:19:20 +0000 |
commit | dc9c76aca6cc31ee5c26c0356e10955b3e0b0440 (patch) | |
tree | 6df74e3ba68a60c45b7206acb3cb8f6c38fe1132 | |
parent | fa796dd720f1b34596a043f17f098fac18ecc028 (diff) |
Added LLVM_BUILD_MODE to cmake so that lit supports tests with REQUIRES: {buildmode}.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133205 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | cmake/modules/HandleLLVMOptions.cmake | 5 | ||||
-rw-r--r-- | test/CMakeLists.txt | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake index d0427acbd5..e725684261 100644 --- a/cmake/modules/HandleLLVMOptions.cmake +++ b/cmake/modules/HandleLLVMOptions.cmake @@ -36,8 +36,13 @@ if( LLVM_ENABLE_ASSERTIONS ) # explicitly undefine it: if( uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE" ) add_definitions( -UNDEBUG ) + set(LLVM_BUILD_MODE "Release") + else() + set(LLVM_BUILD_MODE "Debug") endif() + set(LLVM_BUILD_MODE "${LLVM_BUILD_MODE}+Asserts") else() + set(LLVM_BUILD_MODE "Release") if( NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE" ) if( NOT MSVC_IDE AND NOT XCODE ) add_definitions( -DNDEBUG ) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 993b6e2744..82eac60642 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -71,7 +71,7 @@ if(PYTHONINTERP_FOUND) MAKE_DIRECTORY(${CMAKE_CURRENT_BINARY_DIR}/Unit) # Configuration-time: See Unit/lit.site.cfg.in - set(LLVM_BUILD_MODE "%(build_mode)s") + set(LLVM_BUILD_MODE "${LLVM_BUILD_MODE}") set(LLVM_SOURCE_DIR ${LLVM_MAIN_SRC_DIR}) set(LLVM_BINARY_DIR ${LLVM_BINARY_DIR}) |