diff options
author | David Cole <david.cole@kitware.com> | 2010-10-28 18:11:07 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2010-10-28 18:11:07 (GMT) |
commit | e561a46c1a852516dcbb1d435a4b8c6f95f636c3 (patch) | |
tree | aeb917d1c6b07212e0c1909c65775bd4cb5934c6 /Tests | |
parent | a3edde36ad870d669c054701bccf6c1d14d2d72c (diff) | |
parent | 48e80eb7246683f471f3886436020d34c784be86 (diff) | |
download | CMake-e561a46c1a852516dcbb1d435a4b8c6f95f636c3.zip CMake-e561a46c1a852516dcbb1d435a4b8c6f95f636c3.tar.gz CMake-e561a46c1a852516dcbb1d435a4b8c6f95f636c3.tar.bz2 |
Merge topic 'getprerequisites-endless-path-appending'
48e80eb Fixes to GetPrerequisites for cygwin
bee4802 Append the gp_tool path to the system PATH using native slashes.
8e550ba Remove unecessary TO_CMAKE_PATH for gp_cmd_dir.
1684198 Switch to CMAKE_PATH when doing PATH comparisons on Windows.
be94c49 Fixed appending PATH to dumpbin tool from growing without bounds.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CMakeTests/GetPrerequisitesTest.cmake.in | 22 |
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") |