mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-07 06:09:52 -06:00
There's no need to check if flushing is needed after every command is added to the variable holding the script content. It is enough to only check once per test name. This simplifies the flushing logic, removing the need for a separate flush_script() command. Previously, we were not clearing the flushed script contents in all cases, but this is now rigorously enforced at the one location where flushing is performed. Also simplify the flushing of the list of test names, since that too doesn't need a separate command. It is simpler and safer to handle that directly inline where the one call to flush_tests_buffer() was previously being made. Fixes: #26431
21 lines
447 B
CMake
21 lines
447 B
CMake
enable_language(CXX)
|
|
include(GoogleTest)
|
|
|
|
enable_testing()
|
|
|
|
include(xcode_sign_adhoc.cmake)
|
|
|
|
add_executable(flush_script_test flush_script_test.cpp)
|
|
xcode_sign_adhoc(flush_script_test)
|
|
gtest_discover_tests(
|
|
flush_script_test
|
|
)
|
|
|
|
configure_file(GoogleTest-discovery-flush-script-check-list.cmake.in
|
|
check-test-lists.cmake
|
|
@ONLY
|
|
)
|
|
set_property(DIRECTORY APPEND PROPERTY TEST_INCLUDE_FILES
|
|
${CMAKE_CURRENT_BINARY_DIR}/check-test-lists.cmake
|
|
)
|