summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeTests/GetPrerequisitesTest.cmake.in
diff options
context:
space:
mode:
authorDavid Partyka <dave.partyka@kitware.com>2010-10-25 17:40:35 (GMT)
committerDavid Partyka <dave.partyka@kitware.com>2010-10-25 17:40:35 (GMT)
commitbe94c494eda5437bd7c026f6619d6ab040593e7a (patch)
tree65f0c0d65607f55a3990fe350d7e96df6b75c8ee /Tests/CMakeTests/GetPrerequisitesTest.cmake.in
parent06b5eaa3cf7dc534415473eb1f3bfef191008999 (diff)
downloadCMake-be94c494eda5437bd7c026f6619d6ab040593e7a.zip
CMake-be94c494eda5437bd7c026f6619d6ab040593e7a.tar.gz
CMake-be94c494eda5437bd7c026f6619d6ab040593e7a.tar.bz2
Fixed appending PATH to dumpbin tool from growing without bounds.
IF(... MATCHES ...) used for comparing directories chokes especially in the case of C:\Program Files (x86)\<blah> because of regex pattern matching. Switched this to use STREQUAL in a loop instead.
Diffstat (limited to 'Tests/CMakeTests/GetPrerequisitesTest.cmake.in')
-rw-r--r--Tests/CMakeTests/GetPrerequisitesTest.cmake.in14
1 files changed, 14 insertions, 0 deletions
diff --git a/Tests/CMakeTests/GetPrerequisitesTest.cmake.in b/Tests/CMakeTests/GetPrerequisitesTest.cmake.in
index e8bfb47..182c223 100644
--- a/Tests/CMakeTests/GetPrerequisitesTest.cmake.in
+++ b/Tests/CMakeTests/GetPrerequisitesTest.cmake.in
@@ -77,6 +77,11 @@ message(STATUS "")
list_prerequisites("${CMAKE_COMMAND}" 0 0 1)
message(STATUS "")
+message(STATUS "=============================================================================")
+string(LENGTH "$ENV{PATH}" PATH_LENGTH_BEGIN)
+message(STATUS "Begin PATH length is: ${PATH_LENGTH_BEGIN}")
+message(STATUS "")
+
# Leave the code for these tests in here, but turn them off by default... they
# take longer than they're worth during development...
@@ -139,6 +144,15 @@ foreach(v ${vs})
endforeach(v)
message(STATUS "")
+message(STATUS "=============================================================================")
+string(LENGTH "$ENV{PATH}" PATH_LENGTH_END)
+message(STATUS "Final PATH length is: ${PATH_LENGTH_END}")
+
+if(PATH_LENGTH_END GREATER ${PATH_LENGTH_BEGIN})
+ message(FATAL_ERROR "list_prerequisties is endlessly appending the path of gp_tool to the PATH.")
+endif()
+message(STATUS "")
+
message(STATUS "=============================================================================")
message(STATUS "End of test")