KhronosGroup / KhronosGroup/SPIRV-Tools
Add CMake options to selectively disable different components
Open
dev:building
- Dominant language
- C++
- Stars
- 1.4k
- Forks
- 709
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 28
Description
Not all SPIRV-Tools components are required by all projects, so having options to selectively enable/disable them would be helpful to optimize build. Something like:
```cmake
option(SPIRV_TOOLS_ENABLE_OPT "Enable SPIRV-Tools-opt" ON)
```
Right now we have to manually exclude generated projects from the build:
```cmake
set(SPIRV_TOOLS_EXCLUDE_TARGETS SPIRV-Tools-link SPIRV-Tools-reduce SPIRV-Tools-shared)
set_target_properties(${SPIRV_TOOLS_EXCLUDE_TARGETS} PROPERTIES EXCLUDE_FROM_ALL 1 EXCLUDE_FROM_DEFAULT_BUILD 1)
```
Contributor guide
Assessment
This issue has not been assessed yet.