mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-10-18 11:10:05 +00:00
Support supplying extra definitions via CMAKE variable
This commit is contained in:
parent
17d941af4f
commit
768d9b42d3
@ -98,6 +98,10 @@ if(${SPIRV_LOG_DEBUG})
|
||||
add_definitions(-DSPIRV_LOG_DEBUG)
|
||||
endif()
|
||||
|
||||
if (DEFINED SPIRV_TOOLS_EXTRA_DEFINITIONS)
|
||||
add_definitions(${SPIRV_TOOLS_EXTRA_DEFINITIONS})
|
||||
endif()
|
||||
|
||||
function(spvtools_default_compile_options TARGET)
|
||||
target_compile_options(${TARGET} PRIVATE ${SPIRV_WARNINGS})
|
||||
|
||||
|
@ -206,6 +206,11 @@ The following CMake options are supported:
|
||||
warnings encountered by enabling the compiler-specific compiler front-end
|
||||
option.
|
||||
|
||||
Additionally, you can pass additional C preprocessor definitions to SPIRV-Tools
|
||||
via setting `SPIRV_TOOLS_EXTRA_DEFINITIONS`. For example, by setting it to
|
||||
`/D_ITERATOR_DEBUG_LEVEL=0` on Windows, you can disable checked iterators and
|
||||
iterator debugging.
|
||||
|
||||
## Library
|
||||
|
||||
### Usage
|
||||
|
Loading…
Reference in New Issue
Block a user