Only add -DSPIRV_CHECK_CONTEXT for Debug builds (#4496)

This commit is contained in:
Lei Zhang 2021-08-30 09:39:40 -04:00 committed by GitHub
parent b8fce5f9e6
commit 702e6af380
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -294,7 +294,7 @@ endif()
# Turn off if they take too long.
option(SPIRV_CHECK_CONTEXT "In a debug build, check if the IR context is in a valid state." ON)
if (${SPIRV_CHECK_CONTEXT})
add_definitions(-DSPIRV_CHECK_CONTEXT)
add_compile_options($<$<CONFIG:Debug>:-DSPIRV_CHECK_CONTEXT>)
endif()
# Precompiled header macro. Parameters are source file list and filename for pch cpp file.