summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeTests/GetPrerequisitesTest.cmake.in
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/CMakeTests/GetPrerequisitesTest.cmake.in')
-rw-r--r--Tests/CMakeTests/GetPrerequisitesTest.cmake.in22
1 files changed, 18 insertions, 4 deletions
diff --git a/Tests/CMakeTests/GetPrerequisitesTest.cmake.in b/Tests/CMakeTests/GetPrerequisitesTest.cmake.in
index e8bfb47..daf467b 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...
@@ -116,11 +121,11 @@ message(STATUS "")
message(STATUS "=============================================================================")
message(STATUS "Test overriding 'gp_tool' with value unlikely to be found")
message(STATUS "")
-if(WIN32 OR APPLE)
- set(gp_tool "ldd")
-else(WIN32 OR APPLE)
+if(APPLE)
+ set(gp_tool "dumpbin")
+else()
set(gp_tool "otool")
-endif(WIN32 OR APPLE)
+endif()
set(gp_cmd "gp_cmd-NOTFOUND")
list_prerequisites("${CMAKE_COMMAND}" 0 0 0)
set(gp_cmd)
@@ -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")