Skip to content

Commit 1a0ed56

Browse files
authored
[Comgr][SPIRV] Switch check from INCLUDE_FILE_CXX to EXISTS (llvm#461)
The previous INCLUDE_FILE_CXX check did not work correctly, and always returned false. Checking EXISTS instead gives us the expected behavior
1 parent a1a357d commit 1a0ed56

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

amd/comgr/CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,12 @@ message("")
178178
option(COMGR_DISABLE_SPIRV "To disable SPIRV in Comgr" OFF)
179179

180180
if (NOT COMGR_DISABLE_SPIRV)
181-
CHECK_INCLUDE_FILE_CXX(LLVMSPIRVLib/LLVMSPIRVLib.h HAVE_LLVMSPIRVLIB_H)
182-
if (NOT HAVE_LLVMSPIRVLIB_H)
181+
# TODO: Explore switching this to CHECK_INCLUDE_FILE_CXX() macro
182+
if (NOT EXISTS "${LLVM_INCLUDE_DIRS}/LLVMSPIRVLib/LLVMSPIRVLib.h")
183+
message("-- LLVMSPIRVLib/LLVMSPIRVLib.h not found")
183184
set(COMGR_DISABLE_SPIRV ON)
185+
else()
186+
message("-- LLVMSPIRVLib/LLVMSPIRVLib.h found")
184187
endif()
185188
endif()
186189

0 commit comments

Comments
 (0)