Print an error when SPIR-V is requested and ENABLE_SPIRV=0 is set

This case fails slightly less silently now.
Also make ENABLE_OPT depend on ENABLE_SPIRV, since when there's no
SPIR-V optimization doesn't really make sense.
This commit is contained in:
Arcady Goldmints-Orlov 2024-09-20 17:53:58 -04:00 committed by arcady-lunarg
parent 467ce01c71
commit 15ebcea676
2 changed files with 5 additions and 3 deletions

View file

@ -115,7 +115,7 @@ CMAKE_DEPENDENT_OPTION(ENABLE_EMSCRIPTEN_ENVIRONMENT_NODE
option(ENABLE_HLSL "Enables HLSL input support" ON)
option(ENABLE_RTTI "Enables RTTI")
option(ENABLE_EXCEPTIONS "Enables Exceptions")
option(ENABLE_OPT "Enables spirv-opt capability if present" ON)
CMAKE_DEPENDENT_OPTION(ENABLE_OPT "Enables spirv-opt capability if present" ON "ENABLE_SPIRV" OFF)
if(MINGW OR (APPLE AND ${CMAKE_CXX_COMPILER_ID} MATCHES "GNU"))
# Workaround for CMake behavior on Mac OS with gcc, cmake generates -Xarch_* arguments