summaryrefslogtreecommitdiffstats
path: root/Source/cmTest.h
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2024-09-30 11:13:13 (GMT)
committerCraig Scott <craig.scott@crascit.com>2024-10-02 00:09:11 (GMT)
commitfc7aa3cd69eee1cdb001e6a28f36ddd01cefe720 (patch)
tree7e65266786f0db5d5ba66f9a95d58c756f408b09 /Source/cmTest.h
parent9f1703530bae90704cd4a096c14cfec4ab1e7cec (diff)
downloadCMake-fc7aa3cd69eee1cdb001e6a28f36ddd01cefe720.zip
CMake-fc7aa3cd69eee1cdb001e6a28f36ddd01cefe720.tar.gz
CMake-fc7aa3cd69eee1cdb001e6a28f36ddd01cefe720.tar.bz2
tests: Preserve empty arguments in test command lines
This will now preserve empty values in the TEST_LAUNCHER and CROSSCOMPILING_EMULATOR target properties for tests added by: - The add_test() command. - The ExternalData_Add_Test() command from the ExternalData module. - The gtest_add_tests() or gtest_discover_tests() commands from the GoogleTest module. For the gtest_add_tests() and gtest_discover_tests() commands, empty elements in the values passed after the EXTRA_ARGS keyword are also now preserved. Policy CMP0178 is added to provide backward compatibility with the old behavior where empty values were silently discarded from the above cases. Fixes: #26337
Diffstat (limited to 'Source/cmTest.h')
-rw-r--r--Source/cmTest.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/Source/cmTest.h b/Source/cmTest.h
index 480966a..244aa62 100644
--- a/Source/cmTest.h
+++ b/Source/cmTest.h
@@ -61,12 +61,22 @@ public:
bool GetOldStyle() const { return this->OldStyle; }
void SetOldStyle(bool b) { this->OldStyle = b; }
- /** Get/Set if CMP0158 policy is NEW */
+ /** Get if CMP0158 policy is NEW */
bool GetCMP0158IsNew() const
{
return this->PolicyStatusCMP0158 == cmPolicies::NEW;
}
+ /** Get/Set the CMP0178 policy setting */
+ cmPolicies::PolicyStatus GetCMP0178() const
+ {
+ return this->PolicyStatusCMP0178;
+ }
+ void SetCMP0178(cmPolicies::PolicyStatus p)
+ {
+ this->PolicyStatusCMP0178 = p;
+ }
+
/** Set/Get whether lists in command lines should be expanded. */
bool GetCommandExpandLists() const;
void SetCommandExpandLists(bool b);
@@ -82,4 +92,5 @@ private:
cmMakefile* Makefile;
cmListFileBacktrace Backtrace;
cmPolicies::PolicyStatus PolicyStatusCMP0158;
+ cmPolicies::PolicyStatus PolicyStatusCMP0178;
};