aboutsummaryrefslogtreecommitdiffstats
path: root/test/CMakeLists.txt
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2011-06-22 05:43:36 +0000
committerAndrew Trick <atrick@apple.com>2011-06-22 05:43:36 +0000
commit4383c282af954e4f65ae3b77c891fa41a4960a2a (patch)
treed038801736fc16cf7871fdca787922c7aecf778b /test/CMakeLists.txt
parentc9be25726114b43ac03a4f8f84b537c21ee2bd6d (diff)
downloadexternal_llvm-4383c282af954e4f65ae3b77c891fa41a4960a2a.zip
external_llvm-4383c282af954e4f65ae3b77c891fa41a4960a2a.tar.gz
external_llvm-4383c282af954e4f65ae3b77c891fa41a4960a2a.tar.bz2
Only do config-time substitution of LLVM_BUILD_MODE in
test/lit.site.cfg, not Unit/test/lit.site.cfg. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133608 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CMakeLists.txt')
-rw-r--r--test/CMakeLists.txt9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 82eac60..2db58b9 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -71,8 +71,6 @@ if(PYTHONINTERP_FOUND)
MAKE_DIRECTORY(${CMAKE_CURRENT_BINARY_DIR}/Unit)
# Configuration-time: See Unit/lit.site.cfg.in
- set(LLVM_BUILD_MODE "${LLVM_BUILD_MODE}")
-
set(LLVM_SOURCE_DIR ${LLVM_MAIN_SRC_DIR})
set(LLVM_BINARY_DIR ${LLVM_BINARY_DIR})
set(LLVM_TOOLS_DIR "${LLVM_TOOLS_BINARY_DIR}/%(build_config)s")
@@ -81,10 +79,17 @@ if(PYTHONINTERP_FOUND)
set(ENABLE_SHARED ${LLVM_SHARED_LIBS_ENABLED})
set(SHLIBPATH_VAR ${SHLIBPATH_VAR})
+ # lit.site.cfg uses the config-time build mode
+ set(LLVM_BUILD_MODE "${LLVM_BUILD_MODE}")
+
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
@ONLY)
+
+ # Unit/lit.site.cfg substitutes the runtime build_mode
+ set(LLVM_BUILD_MODE "%(build_mode)s")
+
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.in
${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg