File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,12 @@ cmake_minimum_required ( VERSION 2.8.8 FATAL_ERROR )
1515set ( CMAKE_CONFIGURATION_TYPES "Debug" "Release" "MinSizeRel" "RelWithDebInfo" )
1616set ( CMAKE_BUILD_TYPE "Release"
1717 CACHE STRING "Select which configuration to build." )
18- set_property ( CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${CMAKE_CONFIGURATION_TYPES} )
1918
2019enable_language ( Fortran )
2120include ( "cmake/pickFortranCompilerFlags.cmake" )
2221
22+ set_property ( CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${CMAKE_CONFIGURATION_TYPES} )
23+
2324# Check for in-source builds and error out if found
2425# Provides an advanced option to allow in source builds
2526include ( "cmake/checkOutOfSource.cmake" )
Original file line number Diff line number Diff line change @@ -23,11 +23,10 @@ if ( NOT Fortran_FLAGS_INIT )
2323 set ( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -check all" )
2424 endif ()
2525 elseif ( "${CMAKE_Fortran_COMPILER_ID} " MATCHES "GNU" )
26- set ( ENABLE_CODE_COVERAGE FALSE CACHE BOOL
27- "Compile with code coverage output enabled using gcov. May not work on Mac." )
28- if ( ENABLE_CODE_COVERAGE )
29- set ( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fprofile-arcs -ftest-coverage" )
30- endif ()
26+ # add a coverage build configuration
27+ set ( CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} "Coverage" )
28+ set ( CMAKE_Fortran_FLAGS_COVERAGE "-fprofile-arcs -ftest-coverage -O0" CACHE STRING
29+ "Fortran compiler flags for coverage configuration" )
3130 if ( ENABLE_BACK_TRACE )
3231 set ( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fbacktrace" )
3332 endif ()
You can’t perform that action at this time.
0 commit comments