diff options
author | Brad King <brad.king@kitware.com> | 2020-03-13 14:46:11 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-03-13 14:46:20 (GMT) |
commit | c3ab1c22b069b64483a0525c3244e3377f256a87 (patch) | |
tree | d0cd0fcccb5737ad09fd79c5d808e45f64c98db6 /Modules | |
parent | ba216592fcd196bbbaaea31a1a19de44f1cd2d04 (diff) | |
parent | 2ba8ac07ed50b11946c52c37ddab4f65536d36ea (diff) | |
download | CMake-c3ab1c22b069b64483a0525c3244e3377f256a87.zip CMake-c3ab1c22b069b64483a0525c3244e3377f256a87.tar.gz CMake-c3ab1c22b069b64483a0525c3244e3377f256a87.tar.bz2 |
Merge topic 'GoogleTest-gtest_discover_tests-failure'
2ba8ac07ed GoogleTest: Fix CTest not failing if gtest_discover_tests fails
2c9680eec5 GoogleTest: Add missing test case for gtest_discover_tests failure
Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Steffen Seckler <steffen.seckler@tum.de>
Acked-by: Matthew Woehlke <matthew.woehlke@kitware.com>
Merge-request: !4466
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/GoogleTestAddTests.cmake | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/GoogleTestAddTests.cmake b/Modules/GoogleTestAddTests.cmake index 4f52ad2..73e55ea 100644 --- a/Modules/GoogleTestAddTests.cmake +++ b/Modules/GoogleTestAddTests.cmake @@ -13,11 +13,13 @@ set(tests) set(tests_buffer) # Overwrite possibly existing ${CTEST_FILE} with empty file -file(WRITE "${CTEST_FILE}" "") +set(flush_tests_MODE WRITE) # Flushes script to ${CTEST_FILE} macro(flush_script) - file(APPEND "${CTEST_FILE}" "${script}") + file(${flush_tests_MODE} "${CTEST_FILE}" "${script}") + set(flush_tests_MODE APPEND) + set(script "") endmacro() |