Procházet zdrojové kódy

build: make the debug build suitable for SizeBench

Michele Caini před 2 roky
rodič
revize
ef7fa8ae0f
1 změnil soubory, kde provedl 9 přidání a 1 odebrání
  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
                 $<$<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}