summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2002-03-08 16:01:10 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2002-03-08 16:01:10 (GMT)
commitb45f96a83b5f74e194943df1cb5a3433a34da7a2 (patch)
tree3d3a4f5e7f97d851dfe7c65576cde033596b6757
parentf3c15849f1235cb1df4b6c317c8cd3ed124fbd9a (diff)
downloadCMake-b45f96a83b5f74e194943df1cb5a3433a34da7a2.zip
CMake-b45f96a83b5f74e194943df1cb5a3433a34da7a2.tar.gz
CMake-b45f96a83b5f74e194943df1cb5a3433a34da7a2.tar.bz2
more stupid dec cxx tricks...
-rw-r--r--Tests/Complex/Executable/complex.cxx35
-rw-r--r--Tests/ComplexOneConfig/Executable/complex.cxx35
-rw-r--r--Tests/ComplexRelativePaths/Executable/complex.cxx35
3 files changed, 72 insertions, 33 deletions
diff --git a/Tests/Complex/Executable/complex.cxx b/Tests/Complex/Executable/complex.cxx
index 519c020..d239b5c 100644
--- a/Tests/Complex/Executable/complex.cxx
+++ b/Tests/Complex/Executable/complex.cxx
@@ -8,6 +8,30 @@
int cm_passed = 0;
int cm_failed = 0;
+// Here is a stupid function that tries to use std::string methods
+// so that the dec cxx compiler will instantiate the stuff that
+// we are using from the CMakeLib library....
+
+void ForceStringUse()
+{
+ std::vector<std::string> v;
+ std::vector<std::string> v2;
+ v = v2;
+ std::string cachetest = CACHE_TEST_VAR_INTERNAL;
+ v.push_back(cachetest);
+ v2 = v;
+ std::string x(5,'x');
+ char buff[5];
+ x.copy(buff, 1, 0);
+ std::string::size_type pos = 0;
+ x.replace(pos, pos, pos, 'x');
+ std::string copy = cachetest;
+ cachetest.find("bar");
+ cachetest.rfind("bar");
+ copy.append(cachetest);
+ copy = cachetest.substr(0, cachetest.size());
+}
+
// ======================================================================
void cmFailed(const char* Message, const char* m2= "")
@@ -471,18 +495,7 @@ int main()
cmFailed("the LOAD_CACHE or CONFIGURE_FILE command is broken, "
"CACHE_TEST_VAR_INTERNAL is not defined.");
#else
- std::vector<std::string> v;
- std::vector<std::string> v2;
- v = v2;
std::string cachetest = CACHE_TEST_VAR_INTERNAL;
- v.push_back(cachetest);
- v2 = v;
- std::string x(5,'x');
- std::string copy = cachetest;
- cachetest.find("bar");
- cachetest.rfind("bar");
- copy.append(cachetest);
- copy = cachetest.substr(0, cachetest.size());
if(cachetest != "bar")
{
cmFailed("the LOAD_CACHE or CONFIGURE_FILE command is broken, "
diff --git a/Tests/ComplexOneConfig/Executable/complex.cxx b/Tests/ComplexOneConfig/Executable/complex.cxx
index 519c020..d239b5c 100644
--- a/Tests/ComplexOneConfig/Executable/complex.cxx
+++ b/Tests/ComplexOneConfig/Executable/complex.cxx
@@ -8,6 +8,30 @@
int cm_passed = 0;
int cm_failed = 0;
+// Here is a stupid function that tries to use std::string methods
+// so that the dec cxx compiler will instantiate the stuff that
+// we are using from the CMakeLib library....
+
+void ForceStringUse()
+{
+ std::vector<std::string> v;
+ std::vector<std::string> v2;
+ v = v2;
+ std::string cachetest = CACHE_TEST_VAR_INTERNAL;
+ v.push_back(cachetest);
+ v2 = v;
+ std::string x(5,'x');
+ char buff[5];
+ x.copy(buff, 1, 0);
+ std::string::size_type pos = 0;
+ x.replace(pos, pos, pos, 'x');
+ std::string copy = cachetest;
+ cachetest.find("bar");
+ cachetest.rfind("bar");
+ copy.append(cachetest);
+ copy = cachetest.substr(0, cachetest.size());
+}
+
// ======================================================================
void cmFailed(const char* Message, const char* m2= "")
@@ -471,18 +495,7 @@ int main()
cmFailed("the LOAD_CACHE or CONFIGURE_FILE command is broken, "
"CACHE_TEST_VAR_INTERNAL is not defined.");
#else
- std::vector<std::string> v;
- std::vector<std::string> v2;
- v = v2;
std::string cachetest = CACHE_TEST_VAR_INTERNAL;
- v.push_back(cachetest);
- v2 = v;
- std::string x(5,'x');
- std::string copy = cachetest;
- cachetest.find("bar");
- cachetest.rfind("bar");
- copy.append(cachetest);
- copy = cachetest.substr(0, cachetest.size());
if(cachetest != "bar")
{
cmFailed("the LOAD_CACHE or CONFIGURE_FILE command is broken, "
diff --git a/Tests/ComplexRelativePaths/Executable/complex.cxx b/Tests/ComplexRelativePaths/Executable/complex.cxx
index 519c020..d239b5c 100644
--- a/Tests/ComplexRelativePaths/Executable/complex.cxx
+++ b/Tests/ComplexRelativePaths/Executable/complex.cxx
@@ -8,6 +8,30 @@
int cm_passed = 0;
int cm_failed = 0;
+// Here is a stupid function that tries to use std::string methods
+// so that the dec cxx compiler will instantiate the stuff that
+// we are using from the CMakeLib library....
+
+void ForceStringUse()
+{
+ std::vector<std::string> v;
+ std::vector<std::string> v2;
+ v = v2;
+ std::string cachetest = CACHE_TEST_VAR_INTERNAL;
+ v.push_back(cachetest);
+ v2 = v;
+ std::string x(5,'x');
+ char buff[5];
+ x.copy(buff, 1, 0);
+ std::string::size_type pos = 0;
+ x.replace(pos, pos, pos, 'x');
+ std::string copy = cachetest;
+ cachetest.find("bar");
+ cachetest.rfind("bar");
+ copy.append(cachetest);
+ copy = cachetest.substr(0, cachetest.size());
+}
+
// ======================================================================
void cmFailed(const char* Message, const char* m2= "")
@@ -471,18 +495,7 @@ int main()
cmFailed("the LOAD_CACHE or CONFIGURE_FILE command is broken, "
"CACHE_TEST_VAR_INTERNAL is not defined.");
#else
- std::vector<std::string> v;
- std::vector<std::string> v2;
- v = v2;
std::string cachetest = CACHE_TEST_VAR_INTERNAL;
- v.push_back(cachetest);
- v2 = v;
- std::string x(5,'x');
- std::string copy = cachetest;
- cachetest.find("bar");
- cachetest.rfind("bar");
- copy.append(cachetest);
- copy = cachetest.substr(0, cachetest.size());
if(cachetest != "bar")
{
cmFailed("the LOAD_CACHE or CONFIGURE_FILE command is broken, "