Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,6 @@ if(LLVM_SPIRV_BUILD_EXTERNAL)

message(STATUS "Found LLVM: ${LLVM_VERSION}")

is_llvm_target_library("SPIRV" spirv_present_result INCLUDED_TARGETS)
if(spirv_present_result)
message(STATUS "Found SPIR-V Backend")
set(SPIRV_BACKEND_FOUND TRUE)
add_compile_definitions(LLVM_SPIRV_BACKEND_TARGET_PRESENT)
endif()

option(CCACHE_ALLOWED "allow use of ccache" TRUE)
find_program(CCACHE_EXE_FOUND ccache)
if(CCACHE_EXE_FOUND AND CCACHE_ALLOWED)
Expand All @@ -118,6 +111,13 @@ if(LLVM_SPIRV_BUILD_EXTERNAL)
endif()
endif()

is_llvm_target_library("SPIRV" spirv_present_result INCLUDED_TARGETS)
if(spirv_present_result)
message(STATUS "Found SPIR-V Backend")
set(SPIRV_BACKEND_FOUND TRUE)
add_compile_definitions(LLVM_SPIRV_BACKEND_TARGET_PRESENT)
endif()

set(LLVM_SPIRV_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include)

# first try locating SPIRV-Tools via pkgconfig (the old way)
Expand Down