summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-02-09 23:39:00 (GMT)
committerBrad King <brad.king@kitware.com>2006-02-09 23:39:00 (GMT)
commite666b8e825a59d2adf95eaabfa6685fe28c21067 (patch)
tree583dd0150e039cd562c8e11594cdc59252ee3fe7
parente31f93ea3fbf71c0bfcce168dbed9d9c0ff22029 (diff)
downloadCMake-e666b8e825a59d2adf95eaabfa6685fe28c21067.zip
CMake-e666b8e825a59d2adf95eaabfa6685fe28c21067.tar.gz
CMake-e666b8e825a59d2adf95eaabfa6685fe28c21067.tar.bz2
BUG: Avoid case problems on windows.
-rw-r--r--Tests/Complex/Executable/complex.cxx9
-rw-r--r--Tests/ComplexOneConfig/Executable/complex.cxx9
-rw-r--r--Tests/ComplexRelativePaths/Executable/complex.cxx9
3 files changed, 27 insertions, 0 deletions
diff --git a/Tests/Complex/Executable/complex.cxx b/Tests/Complex/Executable/complex.cxx
index f7f8d53..67459d6 100644
--- a/Tests/Complex/Executable/complex.cxx
+++ b/Tests/Complex/Executable/complex.cxx
@@ -54,6 +54,15 @@ bool TestLibraryOrder(bool shouldFail)
std::string Adir = std::string(BINARY_DIR) + std::string("/A");
std::string Bdir = std::string(BINARY_DIR) + std::string("/B");
std::string Cdir = std::string(BINARY_DIR) + std::string("/C");
+#ifdef _WIN32
+ // Avoid case problems for windows paths.
+ if(Adir[0] >= 'A' && Adir[0] <= 'Z') { Adir[0] += 'a' - 'A'; }
+ if(Bdir[0] >= 'A' && Bdir[0] <= 'Z') { Bdir[0] += 'a' - 'A'; }
+ if(Cdir[0] >= 'A' && Cdir[0] <= 'Z') { Cdir[0] += 'a' - 'A'; }
+ Adir = cmSystemTools::GetActualCaseForPath(Adir.c_str());
+ Bdir = cmSystemTools::GetActualCaseForPath(Bdir.c_str());
+ Cdir = cmSystemTools::GetActualCaseForPath(Cdir.c_str());
+#endif
if(!shouldFail)
{
diff --git a/Tests/ComplexOneConfig/Executable/complex.cxx b/Tests/ComplexOneConfig/Executable/complex.cxx
index f7f8d53..67459d6 100644
--- a/Tests/ComplexOneConfig/Executable/complex.cxx
+++ b/Tests/ComplexOneConfig/Executable/complex.cxx
@@ -54,6 +54,15 @@ bool TestLibraryOrder(bool shouldFail)
std::string Adir = std::string(BINARY_DIR) + std::string("/A");
std::string Bdir = std::string(BINARY_DIR) + std::string("/B");
std::string Cdir = std::string(BINARY_DIR) + std::string("/C");
+#ifdef _WIN32
+ // Avoid case problems for windows paths.
+ if(Adir[0] >= 'A' && Adir[0] <= 'Z') { Adir[0] += 'a' - 'A'; }
+ if(Bdir[0] >= 'A' && Bdir[0] <= 'Z') { Bdir[0] += 'a' - 'A'; }
+ if(Cdir[0] >= 'A' && Cdir[0] <= 'Z') { Cdir[0] += 'a' - 'A'; }
+ Adir = cmSystemTools::GetActualCaseForPath(Adir.c_str());
+ Bdir = cmSystemTools::GetActualCaseForPath(Bdir.c_str());
+ Cdir = cmSystemTools::GetActualCaseForPath(Cdir.c_str());
+#endif
if(!shouldFail)
{
diff --git a/Tests/ComplexRelativePaths/Executable/complex.cxx b/Tests/ComplexRelativePaths/Executable/complex.cxx
index f7f8d53..67459d6 100644
--- a/Tests/ComplexRelativePaths/Executable/complex.cxx
+++ b/Tests/ComplexRelativePaths/Executable/complex.cxx
@@ -54,6 +54,15 @@ bool TestLibraryOrder(bool shouldFail)
std::string Adir = std::string(BINARY_DIR) + std::string("/A");
std::string Bdir = std::string(BINARY_DIR) + std::string("/B");
std::string Cdir = std::string(BINARY_DIR) + std::string("/C");
+#ifdef _WIN32
+ // Avoid case problems for windows paths.
+ if(Adir[0] >= 'A' && Adir[0] <= 'Z') { Adir[0] += 'a' - 'A'; }
+ if(Bdir[0] >= 'A' && Bdir[0] <= 'Z') { Bdir[0] += 'a' - 'A'; }
+ if(Cdir[0] >= 'A' && Cdir[0] <= 'Z') { Cdir[0] += 'a' - 'A'; }
+ Adir = cmSystemTools::GetActualCaseForPath(Adir.c_str());
+ Bdir = cmSystemTools::GetActualCaseForPath(Bdir.c_str());
+ Cdir = cmSystemTools::GetActualCaseForPath(Cdir.c_str());
+#endif
if(!shouldFail)
{