Przeglądaj źródła

build: make the debug build suitable for SizeBench

Michele Caini 2 lat temu
rodzic
commit
ef7fa8ae0f
1 zmienionych plików z 9 dodań i 1 usunięć
  1. 9 1
      test/CMakeLists.txt

+ 9 - 1
test/CMakeLists.txt

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