diff --git a/CMakeLists.txt b/CMakeLists.txt index a5965131d5..aae27a5a13 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -207,7 +207,7 @@ target_include_directories(dawn_internal_config INTERFACE target_link_libraries(dawn_internal_config INTERFACE dawn_public_config) # Compile definitions for the internal config -if (DAWN_ALWAYS_ASSERT OR $) +if (DAWN_ALWAYS_ASSERT OR CMAKE_BUILD_TYPE STREQUAL Debug) target_compile_definitions(dawn_internal_config INTERFACE "DAWN_ENABLE_ASSERTS") endif() if (DAWN_ENABLE_D3D12)