Skip to content

Commit a3d9d29

Browse files
authored
fix windows check for libclc path (#1566)
When running on windows but not with MSVC, no configuration are applied. Also make sure to get the configuration at the right time by using "$<CONFIG>" instead of $(Configuration)
1 parent 3ac3df2 commit a3d9d29

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

cmake/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ add_custom_target(clspv64_builtin_library
116116
DEPENDS ${CLSPV64_LIBRARY_OUTPUT_FILE})
117117

118118
if (NOT DEFINED CLSPV_EXTERNAL_LIBCLC_DIR)
119-
if(MSVC)
120-
set(CLSPV_LIBRARY_INPUT_FILE ${CLSPV_LLVM_BINARY_DIR}/$(Configuration)/lib/clang/${CLANG_EXECUTABLE_VERSION}/lib/spir--/libclc.bc)
121-
set(CLSPV64_LIBRARY_INPUT_FILE ${CLSPV_LLVM_BINARY_DIR}/$(Configuration)/lib/clang/${CLANG_EXECUTABLE_VERSION}/lib/spir64--/libclc.bc)
119+
if(CMAKE_GENERATOR MATCHES "Visual Studio")
120+
set(CLSPV_LIBRARY_INPUT_FILE ${CLSPV_LLVM_BINARY_DIR}/$<CONFIG>/lib/clang/${CLANG_EXECUTABLE_VERSION}/lib/spir--/libclc.bc)
121+
set(CLSPV64_LIBRARY_INPUT_FILE ${CLSPV_LLVM_BINARY_DIR}/$<CONFIG>/lib/clang/${CLANG_EXECUTABLE_VERSION}/lib/spir64--/libclc.bc)
122122
else()
123123
set(CLSPV_LIBRARY_INPUT_FILE ${CLSPV_LLVM_BINARY_DIR}/lib/clang/${CLANG_EXECUTABLE_VERSION}/lib/spir--/libclc.bc)
124124
set(CLSPV64_LIBRARY_INPUT_FILE ${CLSPV_LLVM_BINARY_DIR}/lib/clang/${CLANG_EXECUTABLE_VERSION}/lib/spir64--/libclc.bc)

0 commit comments

Comments
 (0)