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 | d420e7b76cefb350a9cb89f1fb417f3f42636e30 (patch) | |
tree | 6b6f5b3a226ae5be86bfe36cc848a3091e3e8483 /CMakeLists.txt | |
parent | 3946e3b4764ab0146693aad53687d33b7ae6bb78 (diff) | |
download | llvm-d420e7b76cefb350a9cb89f1fb417f3f42636e30.tar.gz llvm-d420e7b76cefb350a9cb89f1fb417f3f42636e30.tar.bz2 llvm-d420e7b76cefb350a9cb89f1fb417f3f42636e30.tar.xz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120212 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2c2c1152c3..4c1cc170e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,20 @@ This process created the file `CMakeCache.txt' and the directory `CMakeFiles'. Please delete them.") endif() +# Run-time build mode; It is used for unittests. +if(MSVC_IDE) + # Expect "$(Configuration)", "$(OutDir)", etc. + # It is expanded by msbuild or similar. + set(RUNTIME_BUILD_MODE "${CMAKE_CFG_INTDIR}") +elseif(NOT CMAKE_BUILD_TYPE STREQUAL "") + # Expect "Release" "Debug", etc. + # Or unittests could not run. + set(RUNTIME_BUILD_MODE ${CMAKE_BUILD_TYPE}) +else() + # It might be "." + set(RUNTIME_BUILD_MODE "${CMAKE_CFG_INTDIR}") +endif() + string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE) set(LLVM_MAIN_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}) |