Skip to content

Commit 04fed93

Browse files
svenvhdwoodwor-intel
authored andcommitted
Enable LLVM_BUILD_TOOLS for out-of-tree builds
This ensures the llvm-spirv tool is added to the "all" target, so that it is included when installing the project. Original commit: KhronosGroup/SPIRV-LLVM-Translator@ae90401
1 parent 272c12b commit 04fed93

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llvm-spirv/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ if (NOT DEFINED LLVM_SPIRV_BUILD_EXTERNAL)
1919
endif(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
2020
endif (NOT DEFINED LLVM_SPIRV_BUILD_EXTERNAL)
2121

22+
if(LLVM_SPIRV_BUILD_EXTERNAL)
23+
# Make sure llvm-spirv gets built when building outside the llvm tree.
24+
set(LLVM_BUILD_TOOLS ON)
25+
endif(LLVM_SPIRV_BUILD_EXTERNAL)
26+
2227
# Download spirv.hpp from the official SPIRV-Headers repository.
2328
# One can skip this step by manually setting
2429
# LLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR path.

0 commit comments

Comments
 (0)