diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2010-11-27 13:10:11 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2010-11-27 13:10:11 +0000 |
commit | f80507c28ccc19024d0bf7afcd09564ed912a00f (patch) | |
tree | 2bc088f698bd834058e68dbe57fa207e28b76222 /llvm/test/CMakeLists.txt | |
parent | Unbreak build for newer GCCs. (diff) | |
download | llvm-project-f80507c28ccc19024d0bf7afcd09564ed912a00f.tar.gz llvm-project-f80507c28ccc19024d0bf7afcd09564ed912a00f.tar.bz2 llvm-project-f80507c28ccc19024d0bf7afcd09564ed912a00f.zip |
CMake: lit(check.vcproj) can run with multiple configurations on Visual Studio.
Unittests need LLVM_BUILD_MODE to pick up each test.
Confirmed on CentOS5, Mingw, MSYS, and with possible configurations on VS8 and VS10.
llvm-svn: 120212
Diffstat (limited to 'llvm/test/CMakeLists.txt')
-rw-r--r-- | llvm/test/CMakeLists.txt | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/llvm/test/CMakeLists.txt b/llvm/test/CMakeLists.txt index 5a8678be2b28..0d622fa536bc 100644 --- a/llvm/test/CMakeLists.txt +++ b/llvm/test/CMakeLists.txt @@ -50,20 +50,14 @@ 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_SOURCE_DIR ${LLVM_MAIN_SRC_DIR}) set(LLVM_BINARY_DIR ${LLVM_BINARY_DIR}) - set(LLVM_TOOLS_DIR "${LLVM_TOOLS_BINARY_DIR}/${CMAKE_CFG_INTDIR}") + set(LLVM_TOOLS_DIR "${LLVM_TOOLS_BINARY_DIR}/%(build_config)s") set(LLVMGCCDIR "") set(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE}) - if (CMAKE_CONFIGURATION_TYPES) - # FIXME: We have no idea. It could be any of them... So just output all of - # them. - set(LLVM_BUILD_MODE "${CMAKE_CONFIGURATION_TYPES}") - elseif (CMAKE_BUILD_TYPE) - set(LLVM_BUILD_MODE "${CMAKE_BUILD_TYPE}") - else() - set(LLVM_BUILD_MODE "None") - endif() set(ENABLE_SHARED ${LLVM_SHARED_LIBS_ENABLED}) set(SHLIBPATH_VAR ${SHLIBPATH_VAR}) @@ -81,6 +75,8 @@ if(PYTHONINTERP_FOUND) ${LLVM_SOURCE_DIR}/utils/lit/lit.py --param llvm_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg --param llvm_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg + --param build_config=${CMAKE_CFG_INTDIR} + --param build_mode=${RUNTIME_BUILD_MODE} ${LIT_ARGS} ${CMAKE_CURRENT_BINARY_DIR} DEPENDS |