build: make the debug build suitable for SizeBench

This commit is contained in:
Michele Caini
2023-06-23 10:56:35 +02:00
parent 72fa115160
commit ef7fa8ae0f

View File

@@ -65,9 +65,17 @@ function(SETUP_TARGET TARGET_NAME)
# documentation diagnostic turned on for clang-cl only
$<$<STREQUAL:"${CMAKE_CXX_COMPILER_ID}","Clang">:-Wdocumentation>
/EHsc /wd4324 /wd4996
$<$<CONFIG:Debug>:/Od>
# disabling INCREMENTAL is required by SizeBench
$<$<CONFIG:Debug>:/Od /INCREMENTAL:NO>
$<$<CONFIG:Release>:/O2>
)
target_link_options(
${TARGET_NAME}
PRIVATE
# disabling INCREMENTAL is required by SizeBench
$<$<CONFIG:Debug>:/INCREMENTAL:NO>
)
else()
target_compile_options(
${TARGET_NAME}