diff options
Diffstat (limited to 'Modules/GoogleTestAddTests.cmake')
-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() |