diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CTestCoverageCollectGCOV.cmake | 18 | ||||
-rw-r--r-- | Modules/Platform/Darwin-Initialize.cmake | 4 |
2 files changed, 17 insertions, 5 deletions
diff --git a/Modules/CTestCoverageCollectGCOV.cmake b/Modules/CTestCoverageCollectGCOV.cmake index ff48cc2..b498086 100644 --- a/Modules/CTestCoverageCollectGCOV.cmake +++ b/Modules/CTestCoverageCollectGCOV.cmake @@ -137,11 +137,23 @@ function(ctest_coverage_collect_gcov) if(NOT DEFINED GCOV_GCOV_OPTIONS) set(GCOV_GCOV_OPTIONS -b -x) endif() + if (GCOV_QUIET) + set(coverage_out_opts + OUTPUT_QUIET + ERROR_QUIET + ) + else() + set(coverage_out_opts + OUTPUT_FILE "${coverage_dir}/gcov.log" + ERROR_FILE "${coverage_dir}/gcov.log" + ) + endif() execute_process(COMMAND ${gcov_command} ${GCOV_GCOV_OPTIONS} ${gcda_files} - OUTPUT_VARIABLE out RESULT_VARIABLE res - WORKING_DIRECTORY ${coverage_dir}) + WORKING_DIRECTORY ${coverage_dir} + ${coverage_out_opts} + ) if (GCOV_DELETE) file(REMOVE ${gcda_files}) @@ -149,7 +161,7 @@ function(ctest_coverage_collect_gcov) if(NOT "${res}" EQUAL 0) if (NOT GCOV_QUIET) - message(STATUS "Error running gcov: ${res} ${out}") + message(STATUS "Error running gcov: ${res}, see\n ${coverage_dir}/gcov.log") endif() endif() # create json file with project information diff --git a/Modules/Platform/Darwin-Initialize.cmake b/Modules/Platform/Darwin-Initialize.cmake index 729217c..80e668e 100644 --- a/Modules/Platform/Darwin-Initialize.cmake +++ b/Modules/Platform/Darwin-Initialize.cmake @@ -136,7 +136,7 @@ endfunction() # Handle multi-arch sysroots. Do this before CMAKE_OSX_SYSROOT is # transformed into a path, so that we know the sysroot name. function(_apple_resolve_multi_arch_sysroots) - if(CMAKE_APPLE_ARCH_SYSROOTS) + if(DEFINED CMAKE_APPLE_ARCH_SYSROOTS) return() # Already cached endif() @@ -202,7 +202,7 @@ function(_apple_resolve_multi_arch_sysroots) list(APPEND _arch_sysroots ${_arch_sysroot}) else() message(WARNING "No SDK found for architecture '${arch}'") - list(APPEND _arch_sysroots "") # Placeholder + list(APPEND _arch_sysroots "${arch}-SDK-NOTFOUND") endif() endforeach() |