diff options
author | Brad King <brad.king@kitware.com> | 2015-02-24 14:12:33 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-02-24 14:12:33 (GMT) |
commit | 206ce77781d7f19a9877caab137d69cc5ce4bb05 (patch) | |
tree | c273ae315fd7a59f8b92851199b58a37ee130bfe /Modules | |
parent | 8366b1bd4fff38d2e928edee1f93acdee12365d4 (diff) | |
parent | ff1ddd2a73dd04e3015c2bc4ffe345f8c6ca02ee (diff) | |
download | CMake-206ce77781d7f19a9877caab137d69cc5ce4bb05.zip CMake-206ce77781d7f19a9877caab137d69cc5ce4bb05.tar.gz CMake-206ce77781d7f19a9877caab137d69cc5ce4bb05.tar.bz2 |
Merge topic 'ctest-output-options'
ff1ddd2a ctest_upload: Add QUIET option
0b87b2a3 ctest_memcheck: Add QUIET option
fc58bdb9 ctest_coverage: Add QUIET option
876a680d ctest_test: Add QUIET option
49ba4545 ctest_build: Add QUIET option
f999dc0b ctest_configure: Add QUIET option
645ad117 ctest_update: Add QUIET option
19d1a559 ctest_start: Add QUIET option
1643b905 ctest_submit: Add QUIET option
12db1139 CTest: Add cmCTestOptionalLog macro
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CTestCoverageCollectGCOV.cmake | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/Modules/CTestCoverageCollectGCOV.cmake b/Modules/CTestCoverageCollectGCOV.cmake index a607c52..4519627 100644 --- a/Modules/CTestCoverageCollectGCOV.cmake +++ b/Modules/CTestCoverageCollectGCOV.cmake @@ -45,6 +45,10 @@ # Specify options to be passed to gcov. The ``gcov`` command # is run as ``gcov <options>... -o <gcov-dir> <file>.gcda``. # If not specified, the default option is just ``-b``. +# +# ``QUIET`` +# Suppress non-error messages that otherwise would have been +# printed out by this function. #============================================================================= # Copyright 2014-2015 Kitware, Inc. @@ -60,7 +64,7 @@ # License text for the above reference.) include(CMakeParseArguments) function(ctest_coverage_collect_gcov) - set(options "") + set(options QUIET) set(oneValueArgs TARBALL SOURCE BUILD GCOV_COMMAND) set(multiValueArgs GCOV_OPTIONS) cmake_parse_arguments(GCOV "${options}" "${oneValueArgs}" @@ -106,8 +110,10 @@ function(ctest_coverage_collect_gcov) # return early if no coverage files were found list(LENGTH gcda_files len) if(len EQUAL 0) - message("ctest_coverage_collect_gcov: No .gcda files found, " - "ignoring coverage request.") + if (NOT GCOV_QUIET) + message("ctest_coverage_collect_gcov: No .gcda files found, " + "ignoring coverage request.") + endif() return() endif() # setup the dir for the coverage files @@ -130,7 +136,9 @@ function(ctest_coverage_collect_gcov) WORKING_DIRECTORY ${coverage_dir}) endforeach() if(NOT "${res}" EQUAL 0) - message(STATUS "Error running gcov: ${res} ${out}") + if (NOT GCOV_QUIET) + message(STATUS "Error running gcov: ${res} ${out}") + endif() endif() # create json file with project information file(WRITE ${coverage_dir}/data.json @@ -151,8 +159,15 @@ function(ctest_coverage_collect_gcov) ${coverage_dir}/data.json ${label_files} ") + + if (GCOV_QUIET) + set(tar_opts "cfj") + else() + set(tar_opts "cvfj") + endif() + execute_process(COMMAND - ${CMAKE_COMMAND} -E tar cvfj ${GCOV_TARBALL} + ${CMAKE_COMMAND} -E tar ${tar_opts} ${GCOV_TARBALL} "--mtime=1970-01-01 0:0:0 UTC" --files-from=${coverage_dir}/coverage_file_list.txt WORKING_DIRECTORY ${binary_dir}) |