llvm.org GIT mirror llvm / e18e76e
[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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198206 91177308-0d34-0410-b5e6-96231b3b80d8 NAKAMURA Takumi 5 years ago
2 changed file(s) with 17 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
11 # llvm-lit needs suffix.py for multiprocess to find a main module.
22 set(suffix .py)
33 endif ()
4 set(llvm_lit_path ${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-lit${suffix})
45
5 configure_file(
6 llvm-lit.in
7 ${LLVM_TOOLS_BINARY_DIR}/llvm-lit${suffix}
8 )
6 if(NOT "${CMAKE_CFG_INTDIR}" STREQUAL ".")
7 foreach(BUILD_MODE ${CMAKE_CONFIGURATION_TYPES})
8 string(REPLACE ${CMAKE_CFG_INTDIR} ${BUILD_MODE} bi ${llvm_lit_path})
9 configure_file(
10 llvm-lit.in
11 ${bi}
12 )
13 endforeach()
14 else()
15 set(BUILD_MODE .)
16 configure_file(
17 llvm-lit.in
18 ${llvm_lit_path}
19 )
20 endif()
1212 # Set up some builtin parameters, so that by default the LLVM test suite
1313 # configuration file knows how to find the object tree.
1414 builtin_parameters = {
15 'build_mode' : "@CMAKE_CFG_INTDIR@",
15 'build_mode' : "@BUILD_MODE@",
1616 'llvm_site_config' : os.path.join(llvm_obj_root, 'test', 'lit.site.cfg'),
1717 'llvm_unit_site_config' : os.path.join(llvm_obj_root, 'test', 'Unit',
1818 'lit.site.cfg')