diff --git a/llvm/cmake/modules/CMakeLists.txt b/llvm/cmake/modules/CMakeLists.txt index cea0c1df0a14..0a7d84fe1c9b 100644 --- a/llvm/cmake/modules/CMakeLists.txt +++ b/llvm/cmake/modules/CMakeLists.txt @@ -135,7 +135,11 @@ extend_path(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}" "${LLVM_TOOLS # Generate a default location for lit if (LLVM_INSTALL_UTILS AND LLVM_BUILD_UTILS) - set(LLVM_CONFIG_DEFAULT_EXTERNAL_LIT "${LLVM_CONFIG_TOOLS_BINARY_DIR}/llvm-lit") + if (CMAKE_HOST_WIN32 AND NOT CYGWIN) + set(LLVM_CONFIG_DEFAULT_EXTERNAL_LIT "${LLVM_CONFIG_TOOLS_BINARY_DIR}/llvm-lit.py") + else() + set(LLVM_CONFIG_DEFAULT_EXTERNAL_LIT "${LLVM_CONFIG_TOOLS_BINARY_DIR}/llvm-lit") + endif() endif() get_config_exports_includes(LLVM LLVM_CONFIG_INCLUDE_EXPORTS)