llvm-6502/utils/llvm-lit/CMakeLists.txt
NAKAMURA Takumi e18e76e424 [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
2013-12-30 07:02:12 +00:00

22 lines
527 B
CMake

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})
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()