summaryrefslogtreecommitdiff
path: root/utils/llvm-lit/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'utils/llvm-lit/CMakeLists.txt')
-rw-r--r--utils/llvm-lit/CMakeLists.txt15
1 files changed, 8 insertions, 7 deletions
diff --git a/utils/llvm-lit/CMakeLists.txt b/utils/llvm-lit/CMakeLists.txt
index 4b10354cfdea..670175c81851 100644
--- a/utils/llvm-lit/CMakeLists.txt
+++ b/utils/llvm-lit/CMakeLists.txt
@@ -1,12 +1,13 @@
-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})
+get_property(LLVM_LIT_CONFIG_MAP GLOBAL PROPERTY LLVM_LIT_CONFIG_MAP)
+
+get_llvm_lit_path(LIT_BASE_DIR LIT_FILE_NAME)
+
+set(LLVM_SOURCE_DIR ${LLVM_MAIN_SRC_DIR})
if(NOT "${CMAKE_CFG_INTDIR}" STREQUAL ".")
foreach(BUILD_MODE ${CMAKE_CONFIGURATION_TYPES})
- string(REPLACE ${CMAKE_CFG_INTDIR} ${BUILD_MODE} bi ${llvm_lit_path})
+ string(REPLACE ${CMAKE_CFG_INTDIR} ${BUILD_MODE} bi ${LIT_BASE_DIR})
+ set(bi "${bi}/${LIT_FILE_NAME}")
configure_file(
llvm-lit.in
${bi}
@@ -16,6 +17,6 @@ else()
set(BUILD_MODE .)
configure_file(
llvm-lit.in
- ${llvm_lit_path}
+ ${LIT_BASE_DIR}/${LIT_FILE_NAME}
)
endif()