diff options
author | Evgeniy Shcherbina <ixsci@pm.me> | 2022-02-09 08:26:51 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-02-11 14:03:40 (GMT) |
commit | 61929f936f3a834a99762aafaf79f9f1ce9cf6d6 (patch) | |
tree | 03c1e35e1de566fbc7912c07f6d2305f13e5330f /Tests/RunCMake/GoogleTest/GoogleTestDiscoveryFlushScript.cmake | |
parent | a15cc7706da8f4a1833539be3f37fbc63ee20e36 (diff) | |
download | CMake-61929f936f3a834a99762aafaf79f9f1ce9cf6d6.zip CMake-61929f936f3a834a99762aafaf79f9f1ce9cf6d6.tar.gz CMake-61929f936f3a834a99762aafaf79f9f1ce9cf6d6.tar.bz2 |
GoogleTest: Fix escaping in test names
Due to add_command() being a macro it introduced excessive and
nonobvious escaping in different parts of the script. Because of
one of such places the resulting script would have an erroneous
${TEST_LIST} if the user data (in test parameters) had a semicolon.
To eliminate this non-obvious escaping, add_command() was converted
to function. Updated the escaping accordingly.
Fixes: #23059
Diffstat (limited to 'Tests/RunCMake/GoogleTest/GoogleTestDiscoveryFlushScript.cmake')
-rw-r--r-- | Tests/RunCMake/GoogleTest/GoogleTestDiscoveryFlushScript.cmake | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Tests/RunCMake/GoogleTest/GoogleTestDiscoveryFlushScript.cmake b/Tests/RunCMake/GoogleTest/GoogleTestDiscoveryFlushScript.cmake new file mode 100644 index 0000000..2c138c7 --- /dev/null +++ b/Tests/RunCMake/GoogleTest/GoogleTestDiscoveryFlushScript.cmake @@ -0,0 +1,14 @@ +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 +) +set_property(DIRECTORY APPEND PROPERTY TEST_INCLUDE_FILES + ${CMAKE_CURRENT_SOURCE_DIR}/GoogleTest-discovery-flush-script-check-list.cmake) |