[llvm] r198206 - [CMake] Generate ${BUILD_MODE}/llvm-lit for each ${CMAKE_CONFIGURATION_TYPES}.
NAKAMURA Takumi
geek4civic at gmail.com
Sun Dec 29 23:02:12 PST 2013
Author: chapuni
Date: Mon Dec 30 01:02:12 2013
New Revision: 198206
URL: http://llvm.org/viewvc/llvm-project?rev=198206&view=rev
Log:
[CMake] Generate ${BUILD_MODE}/llvm-lit for each ${CMAKE_CONFIGURATION_TYPES}.
llvm-lit can be invoked;
$ Release/bin/llvm-lit
instead of;
$ bin/llvm-lit --param buid_mode=Release
Modified:
llvm/trunk/utils/llvm-lit/CMakeLists.txt
llvm/trunk/utils/llvm-lit/llvm-lit.in
Modified: llvm/trunk/utils/llvm-lit/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/llvm-lit/CMakeLists.txt?rev=198206&r1=198205&r2=198206&view=diff
==============================================================================
--- llvm/trunk/utils/llvm-lit/CMakeLists.txt (original)
+++ llvm/trunk/utils/llvm-lit/CMakeLists.txt Mon Dec 30 01:02:12 2013
@@ -2,8 +2,20 @@ if (WIN32 AND NOT CYGWIN)
# llvm-lit needs suffix.py for multiprocess to find a main module.
set(suffix .py)
endif ()
+set(llvm_lit_path ${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-lit${suffix})
-configure_file(
- llvm-lit.in
- ${LLVM_TOOLS_BINARY_DIR}/llvm-lit${suffix}
- )
+if(NOT "${CMAKE_CFG_INTDIR}" STREQUAL ".")
+ foreach(BUILD_MODE ${CMAKE_CONFIGURATION_TYPES})
+ string(REPLACE ${CMAKE_CFG_INTDIR} ${BUILD_MODE} bi ${llvm_lit_path})
+ configure_file(
+ llvm-lit.in
+ ${bi}
+ )
+ endforeach()
+else()
+ set(BUILD_MODE .)
+ configure_file(
+ llvm-lit.in
+ ${llvm_lit_path}
+ )
+endif()
Modified: llvm/trunk/utils/llvm-lit/llvm-lit.in
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/llvm-lit/llvm-lit.in?rev=198206&r1=198205&r2=198206&view=diff
==============================================================================
--- llvm/trunk/utils/llvm-lit/llvm-lit.in (original)
+++ llvm/trunk/utils/llvm-lit/llvm-lit.in Mon Dec 30 01:02:12 2013
@@ -13,7 +13,7 @@ sys.path.insert(0, os.path.join(llvm_sou
# Set up some builtin parameters, so that by default the LLVM test suite
# configuration file knows how to find the object tree.
builtin_parameters = {
- 'build_mode' : "@CMAKE_CFG_INTDIR@",
+ 'build_mode' : "@BUILD_MODE@",
'llvm_site_config' : os.path.join(llvm_obj_root, 'test', 'lit.site.cfg'),
'llvm_unit_site_config' : os.path.join(llvm_obj_root, 'test', 'Unit',
'lit.site.cfg')
More information about the llvm-commits
mailing list