summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmSystemTools.cxx17
-rw-r--r--Source/cmSystemTools.h1
-rw-r--r--Tests/Complex/CMakeLists.txt9
-rw-r--r--Tests/Complex/Executable/complex.cxx14
-rw-r--r--Tests/ComplexOneConfig/CMakeLists.txt9
-rw-r--r--Tests/ComplexOneConfig/Executable/complex.cxx14
-rw-r--r--Tests/ComplexRelativePaths/CMakeLists.txt9
-rw-r--r--Tests/ComplexRelativePaths/Executable/complex.cxx14
8 files changed, 63 insertions, 24 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index bb9ada6..37404c2 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1789,23 +1789,6 @@ std::string cmSystemTools::GetFilenameExtension(const std::string& filename)
}
}
-/**
- * Return file extension of a full filename (dot included).
- */
-std::string cmSystemTools::GetFilenameShortestExtension(const std::string& filename)
-{
- std::string name = cmSystemTools::GetFilenameName(filename);
- std::string::size_type dot_pos = name.rfind(".");
- if(dot_pos != std::string::npos)
- {
- return name.substr(dot_pos);
- }
- else
- {
- return "";
- }
-}
-
/**
* Return file name without extension of a full filename (i.e. without path).
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index df12513..8024617 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -248,7 +248,6 @@ public:
///! return file extension of a full filename (dot included).
static std::string GetFilenameExtension(const std::string&);
- static std::string GetFilenameShortestExtension(const std::string&);
///! return file name without extension of a full filename.
static std::string GetFilenameNameWithoutExtension(const std::string&);
diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt
index bbf72a0..568c8d4 100644
--- a/Tests/Complex/CMakeLists.txt
+++ b/Tests/Complex/CMakeLists.txt
@@ -103,7 +103,12 @@ ENDFOREACH (ext)
FIND_LIBRARY(FIND_DUMMY_LIB
dummylib
PATHS
- ${Complex_BINARY_DIR}/Library)
+ ${Complex_BINARY_DIR}/Library DOC "find dummy lib")
+
+FIND_LIBRARY(FIND_DUMMY_LIB
+ NAMES dummylib dummylib2
+ PATHS
+ ${Complex_BINARY_DIR}/Library DOC "find dummy lib")
#
# Test SET_SOURCE_FILES_PROPERTIES
@@ -135,7 +140,7 @@ IF (WIN32)
EXEC_PROGRAM(${CCOMMAND_COMMAND} ARGS "write_regv \"${hkey}\" \"${dir}\"")
FIND_PATH(REGISTRY_TEST_PATH
${file}
- "[${hkey}]")
+ "[${hkey}]" DOC "Registry_Test_Path")
EXEC_PROGRAM(${CCOMMAND_COMMAND} ARGS "delete_regv \"${hkey}\"")
EXEC_PROGRAM(${CCOMMAND_COMMAND} ARGS "remove \"${dir}/${file}\"")
ENDIF (NOT UNIX)
diff --git a/Tests/Complex/Executable/complex.cxx b/Tests/Complex/Executable/complex.cxx
index 0b20bfd..1dbf54f 100644
--- a/Tests/Complex/Executable/complex.cxx
+++ b/Tests/Complex/Executable/complex.cxx
@@ -691,6 +691,20 @@ int main()
cmFailed("ESCAPE_QUOTES is not working");
}
+
+ // ----------------------------------------------------------------------
+ // Test cmSystemTools::UpperCase
+ std::string str = "abc";
+ std::string strupper = "ABC";
+ if(cmSystemTools::UpperCase(str) == strupper)
+ {
+ cmPassed("cmSystemTools::UpperCase is working");
+ }
+ else
+ {
+ cmFailed("cmSystemTools::UpperCase is working");
+ }
+
// ----------------------------------------------------------------------
// Summary
diff --git a/Tests/ComplexOneConfig/CMakeLists.txt b/Tests/ComplexOneConfig/CMakeLists.txt
index bbf72a0..568c8d4 100644
--- a/Tests/ComplexOneConfig/CMakeLists.txt
+++ b/Tests/ComplexOneConfig/CMakeLists.txt
@@ -103,7 +103,12 @@ ENDFOREACH (ext)
FIND_LIBRARY(FIND_DUMMY_LIB
dummylib
PATHS
- ${Complex_BINARY_DIR}/Library)
+ ${Complex_BINARY_DIR}/Library DOC "find dummy lib")
+
+FIND_LIBRARY(FIND_DUMMY_LIB
+ NAMES dummylib dummylib2
+ PATHS
+ ${Complex_BINARY_DIR}/Library DOC "find dummy lib")
#
# Test SET_SOURCE_FILES_PROPERTIES
@@ -135,7 +140,7 @@ IF (WIN32)
EXEC_PROGRAM(${CCOMMAND_COMMAND} ARGS "write_regv \"${hkey}\" \"${dir}\"")
FIND_PATH(REGISTRY_TEST_PATH
${file}
- "[${hkey}]")
+ "[${hkey}]" DOC "Registry_Test_Path")
EXEC_PROGRAM(${CCOMMAND_COMMAND} ARGS "delete_regv \"${hkey}\"")
EXEC_PROGRAM(${CCOMMAND_COMMAND} ARGS "remove \"${dir}/${file}\"")
ENDIF (NOT UNIX)
diff --git a/Tests/ComplexOneConfig/Executable/complex.cxx b/Tests/ComplexOneConfig/Executable/complex.cxx
index 0b20bfd..1dbf54f 100644
--- a/Tests/ComplexOneConfig/Executable/complex.cxx
+++ b/Tests/ComplexOneConfig/Executable/complex.cxx
@@ -691,6 +691,20 @@ int main()
cmFailed("ESCAPE_QUOTES is not working");
}
+
+ // ----------------------------------------------------------------------
+ // Test cmSystemTools::UpperCase
+ std::string str = "abc";
+ std::string strupper = "ABC";
+ if(cmSystemTools::UpperCase(str) == strupper)
+ {
+ cmPassed("cmSystemTools::UpperCase is working");
+ }
+ else
+ {
+ cmFailed("cmSystemTools::UpperCase is working");
+ }
+
// ----------------------------------------------------------------------
// Summary
diff --git a/Tests/ComplexRelativePaths/CMakeLists.txt b/Tests/ComplexRelativePaths/CMakeLists.txt
index bbf72a0..568c8d4 100644
--- a/Tests/ComplexRelativePaths/CMakeLists.txt
+++ b/Tests/ComplexRelativePaths/CMakeLists.txt
@@ -103,7 +103,12 @@ ENDFOREACH (ext)
FIND_LIBRARY(FIND_DUMMY_LIB
dummylib
PATHS
- ${Complex_BINARY_DIR}/Library)
+ ${Complex_BINARY_DIR}/Library DOC "find dummy lib")
+
+FIND_LIBRARY(FIND_DUMMY_LIB
+ NAMES dummylib dummylib2
+ PATHS
+ ${Complex_BINARY_DIR}/Library DOC "find dummy lib")
#
# Test SET_SOURCE_FILES_PROPERTIES
@@ -135,7 +140,7 @@ IF (WIN32)
EXEC_PROGRAM(${CCOMMAND_COMMAND} ARGS "write_regv \"${hkey}\" \"${dir}\"")
FIND_PATH(REGISTRY_TEST_PATH
${file}
- "[${hkey}]")
+ "[${hkey}]" DOC "Registry_Test_Path")
EXEC_PROGRAM(${CCOMMAND_COMMAND} ARGS "delete_regv \"${hkey}\"")
EXEC_PROGRAM(${CCOMMAND_COMMAND} ARGS "remove \"${dir}/${file}\"")
ENDIF (NOT UNIX)
diff --git a/Tests/ComplexRelativePaths/Executable/complex.cxx b/Tests/ComplexRelativePaths/Executable/complex.cxx
index 0b20bfd..1dbf54f 100644
--- a/Tests/ComplexRelativePaths/Executable/complex.cxx
+++ b/Tests/ComplexRelativePaths/Executable/complex.cxx
@@ -691,6 +691,20 @@ int main()
cmFailed("ESCAPE_QUOTES is not working");
}
+
+ // ----------------------------------------------------------------------
+ // Test cmSystemTools::UpperCase
+ std::string str = "abc";
+ std::string strupper = "ABC";
+ if(cmSystemTools::UpperCase(str) == strupper)
+ {
+ cmPassed("cmSystemTools::UpperCase is working");
+ }
+ else
+ {
+ cmFailed("cmSystemTools::UpperCase is working");
+ }
+
// ----------------------------------------------------------------------
// Summary