Closed perror closed 7 years ago
In the definition of the function APPEND_COVERAGE_COMPILER_FLAGS, you append the COVERAGE_COMPILER_FLAGS twice to CMAKE_CXX_FLAGS where the first one should be on CMAKE_C_FLAGS.
APPEND_COVERAGE_COMPILER_FLAGS
COVERAGE_COMPILER_FLAGS
CMAKE_CXX_FLAGS
CMAKE_C_FLAGS
function(APPEND_COVERAGE_COMPILER_FLAGS) - set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} ${COVERAGE_COMPILER_FLAGS}" PARENT_SCOPE) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COVERAGE_COMPILER_FLAGS}" PARENT_SCOPE) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COVERAGE_COMPILER_FLAGS}" PARENT_SCOPE) message(STATUS "Appending code coverage compiler flags: ${COVERAGE_COMPILER_FLAGS}") endfunction() # APPEND_COVERAGE_COMPILER_FLAGS
In the definition of the function
APPEND_COVERAGE_COMPILER_FLAGS
, you append theCOVERAGE_COMPILER_FLAGS
twice toCMAKE_CXX_FLAGS
where the first one should be onCMAKE_C_FLAGS
.