EXCLUDE_FROM_ALL spirv-tools

This is also being done for gtest for similar reasons.

Currently glslang will build everything from spirv-tools despite
this not being neccessary.

EXCLUDE_FROM_ALL dramatically improves the build performance.

Going from compiling roughly 446 files to 292

Furthermore only the targets we need to install are installed.

Which makes it easier to verify the glslang installation.
This commit is contained in:
Juan Ramos 2023-12-03 21:43:08 -07:00 committed by arcady-lunarg
parent cf1fbbff44
commit a9e7326b2d

View File

@ -71,7 +71,8 @@ endif()
if(ENABLE_OPT AND NOT TARGET SPIRV-Tools-opt)
if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/spirv-tools)
set(SPIRV_SKIP_TESTS ON CACHE BOOL "Skip building SPIRV-Tools tests")
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/spirv-tools spirv-tools)
# EXCLUDE_FROM_ALL will prevent unneccessary build/installation from spirv-tools
add_subdirectory(spirv-tools EXCLUDE_FROM_ALL)
endif()
endif()