diff options
| author | NAKAMURA Takumi <geek4civic@gmail.com> | 2013-01-27 12:20:50 +0000 |
|---|---|---|
| committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2013-01-27 12:20:50 +0000 |
| commit | 61a8f974a79c82133e8c00497271b075114df748 (patch) | |
| tree | 60cde7a8714f656220432fad87a71b0a7318927f /llvm/cmake/modules/AddLLVM.cmake | |
| parent | 05cc93964a88d2ee329a196951dc55a0a5c469b1 (diff) | |
| download | bcm5719-llvm-61a8f974a79c82133e8c00497271b075114df748.tar.gz bcm5719-llvm-61a8f974a79c82133e8c00497271b075114df748.zip | |
[CMake][Lit][unittests] Deprecate CMAKE_BUILD_TYPE in each build directory for unittests.
For example,
cur) unittests/ADT/Release/ADTTests
new) unittests/ADT/ADTTests
RUNTIME_BUILD_MODE can be substituted to CMAKE_CFG_INTDIR.
With Make and Ninja, the tree is not built with multiple configurations.
Then, including the build type in target directory doesn't make sense.
See also "How can I build multiple modes without switching?"
http://www.cmake.org/Wiki/CMake_FAQ
CMAKE_CFG_INTDIR is set to "."
With multiple-configuration-aware build system, like Visual Studio, each unittest is built on appropriate directory, for example,
unittests/ADT/Release/ADTTests.exe
CMAKE_CFG_INTDIR is set to build system's variable, like "$(Configuration)" or "$(OutDir)".
Thus, "--param build_config" is also deprecated.
llvm-svn: 173616
Diffstat (limited to 'llvm/cmake/modules/AddLLVM.cmake')
| -rwxr-xr-x | llvm/cmake/modules/AddLLVM.cmake | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake index 516e02357c9..e41b3e7f51d 100755 --- a/llvm/cmake/modules/AddLLVM.cmake +++ b/llvm/cmake/modules/AddLLVM.cmake @@ -157,11 +157,7 @@ endmacro(add_llvm_external_project) # Returns directory where unittest should reside. function(get_unittest_directory dir) - if (CMAKE_BUILD_TYPE) - set(result ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}) - else() - set(result ${CMAKE_CURRENT_BINARY_DIR}) - endif() + set(result ${CMAKE_CURRENT_BINARY_DIR}) set(${dir} ${result} PARENT_SCOPE) endfunction() @@ -245,8 +241,8 @@ function(configure_lit_site_cfg input output) 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") - set(LLVM_LIBS_DIR "${LLVM_BINARY_DIR}/lib/%(build_config)s") + set(LLVM_TOOLS_DIR "${LLVM_TOOLS_BINARY_DIR}/%(build_mode)s") + set(LLVM_LIBS_DIR "${LLVM_BINARY_DIR}/lib/%(build_mode)s") set(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE}) set(ENABLE_SHARED ${LLVM_SHARED_LIBS_ENABLED}) set(SHLIBPATH_VAR ${SHLIBPATH_VAR}) @@ -272,8 +268,7 @@ function(add_lit_target target comment) set(LIT_COMMAND ${PYTHON_EXECUTABLE} ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py - --param build_config=${CMAKE_CFG_INTDIR} - --param build_mode=${RUNTIME_BUILD_MODE} + --param build_mode=${CMAKE_CFG_INTDIR} ${LIT_ARGS} ) foreach(param ${ARG_PARAMS}) |

