File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed
Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -23,21 +23,25 @@ endif()
2323
2424set (ENABLE_COVERAGE OFF CACHE BOOL "Enable coverage measurements" )
2525if (ENABLE_COVERAGE)
26- include (CodeCoverage)
27- message (WARNING "Enabling code coverage measurements -> disables optimizations and embeds debug information!" )
26+ if (TARGET coverage)
27+ message (WARNING "Found another target coverage, not setting up coverage for linuxdeploy-desktopfile" )
28+ else ()
29+ include (CodeCoverage)
30+ message (WARNING "Enabling code coverage measurements -> disables optimizations and embeds debug information!" )
2831
29- append_coverage_compiler_flags()
32+ append_coverage_compiler_flags()
3033
31- set (COVERAGE_GCOVR_EXCLUDES ${PROJECT_SOURCE_DIR} /lib ${PROJECT_BINARY_DIR} )
34+ set (COVERAGE_GCOVR_EXCLUDES ${PROJECT_SOURCE_DIR} /lib ${PROJECT_BINARY_DIR} )
3235
33- include (ProcessorCount)
34- ProcessorCount(processor_count)
36+ include (ProcessorCount)
37+ ProcessorCount(processor_count)
3538
36- set (command cmake --build . --target all -- -j ${processor_count} && ctest -V)
39+ set (command cmake --build . --target all -- -j ${processor_count} && ctest -V)
3740
38- setup_target_for_coverage_gcovr_html(NAME coverage EXECUTABLE "${command} " )
39- setup_target_for_coverage_gcovr_xml(NAME coverage_xml EXECUTABLE "${command} " )
40- setup_target_for_coverage_gcovr_text(NAME coverage_text EXECUTABLE "${command} " )
41+ setup_target_for_coverage_gcovr_html(NAME coverage EXECUTABLE "${command} " )
42+ setup_target_for_coverage_gcovr_xml(NAME coverage_xml EXECUTABLE "${command} " )
43+ setup_target_for_coverage_gcovr_text(NAME coverage_text EXECUTABLE "${command} " )
44+ endif ()
4145endif ()
4246
4347add_subdirectory (lib)
You can’t perform that action at this time.
0 commit comments