summaryrefslogtreecommitdiffstats
path: root/Tests/Complex/Executable/complex.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/Complex/Executable/complex.cxx')
-rw-r--r--Tests/Complex/Executable/complex.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/Tests/Complex/Executable/complex.cxx b/Tests/Complex/Executable/complex.cxx
index ad41b75..428ce62 100644
--- a/Tests/Complex/Executable/complex.cxx
+++ b/Tests/Complex/Executable/complex.cxx
@@ -471,7 +471,12 @@ int main()
cmFailed("the LOAD_CACHE or CONFIGURE_FILE command is broken, "
"CACHE_TEST_VAR_INTERNAL is not defined.");
#else
- if(strcmp(CACHE_TEST_VAR_INTERNAL, "bar") != 0)
+ std::string cachetest = CACHE_TEST_VAR_INTERNAL;
+ std::string copy = cachetest;
+ cachetest.find("bar");
+ cachetest.rfind("bar");
+ copy = cachetest.substr(0, cachetest.size());
+ if(cachetest != "bar")
{
cmFailed("the LOAD_CACHE or CONFIGURE_FILE command is broken, "
"CACHE_TEST_VAR_INTERNAL == ", CACHE_TEST_VAR_INTERNAL);