Explorar el Código

Don't optimize code generation when doing coverage

In order to make sure all the lines are covered, code optimization should
be turned off.
Julien Finet hace 15 años
padre
commit
8d2caa3f18
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      CMakeLists.txt

+ 1 - 1
CMakeLists.txt

@@ -230,7 +230,7 @@ ENDIF()
 #
 IF(WITH_COVERAGE)
   IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
-    SET(coverage_flags "-g -fprofile-arcs -ftest-coverage -O3 -DNDEBUG")
+    SET(coverage_flags "-g -fprofile-arcs -ftest-coverage -O0 -DNDEBUG")
     SET(COVERAGE_CXX_FLAGS ${coverage_flags})
     SET(COVERAGE_C_FLAGS ${coverage_flags})
   ENDIF()