[Cmake-commits] CMake branch, next, updated. v2.8.2-1105-g57ec8e4

Dave Partyka dave.partyka at kitware.com
Mon Oct 25 13:54:17 EDT 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  57ec8e41cfbc197df5e65018c4e8a37bcc6d37e8 (commit)
       via  be94c494eda5437bd7c026f6619d6ab040593e7a (commit)
       via  06b5eaa3cf7dc534415473eb1f3bfef191008999 (commit)
       via  de81f2a4ee5f704ebd22875ba368d5623f919fa4 (commit)
       via  185582d5feb2925975cb669b0874a4a9cbe452d9 (commit)
      from  ad236f3b5b16af531ef70f015e8087c829bf125c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=57ec8e41cfbc197df5e65018c4e8a37bcc6d37e8
commit 57ec8e41cfbc197df5e65018c4e8a37bcc6d37e8
Merge: ad236f3 be94c49
Author:     Dave Partyka <dave.partyka at kitware.com>
AuthorDate: Mon Oct 25 13:54:12 2010 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Oct 25 13:54:12 2010 -0400

    Merge topic 'getprerequisites-endless-path-appending' into next
    
    be94c49 Fixed appending PATH to dumpbin tool from growing without bounds.
    06b5eaa KWSys Nightly Date Stamp
    de81f2a KWSys Nightly Date Stamp
    185582d KWSys Nightly Date Stamp


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=be94c494eda5437bd7c026f6619d6ab040593e7a
commit be94c494eda5437bd7c026f6619d6ab040593e7a
Author:     David Partyka <dave.partyka at kitware.com>
AuthorDate: Mon Oct 25 13:40:35 2010 -0400
Commit:     David Partyka <dave.partyka at kitware.com>
CommitDate: Mon Oct 25 13:40:35 2010 -0400

    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.

diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake
index c83da4f..e1dae46 100644
--- a/Modules/GetPrerequisites.cmake
+++ b/Modules/GetPrerequisites.cmake
@@ -587,11 +587,19 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
     #
     get_filename_component(gp_cmd_dir "${gp_cmd}" PATH)
     get_filename_component(gp_cmd_dlls_dir "${gp_cmd_dir}/../../Common7/IDE" ABSOLUTE)
+    file(TO_NATIVE_PATH "${gp_cmd_dlls_dir}" gp_cmd_dlls_dir)
     if(EXISTS "${gp_cmd_dlls_dir}")
       # only add to the path if it is not already in the path
-      if(NOT "$ENV{PATH}" MATCHES "${gp_cmd_dlls_dir}")
+      set(gp_found_cmd_dlls_dir 0)
+      foreach(gp_env_path_element $ENV{PATH})
+        if("${gp_env_path_element}" STREQUAL "${gp_cmd_dlls_dir}")
+          set(gp_found_cmd_dlls_dir 1)
+        endif()
+      endforeach(gp_env_path_element)
+
+      if(NOT gp_found_cmd_dlls_dir)
         set(ENV{PATH} "$ENV{PATH};${gp_cmd_dlls_dir}")
-      endif(NOT "$ENV{PATH}" MATCHES "${gp_cmd_dlls_dir}")
+      endif()
     endif(EXISTS "${gp_cmd_dlls_dir}")
   endif("${gp_tool}" STREQUAL "dumpbin")
   #
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")

-----------------------------------------------------------------------

Summary of changes:
 Modules/GetPrerequisites.cmake                 |   12 ++++++++++--
 Source/kwsys/kwsysDateStamp.cmake              |    2 +-
 Tests/CMakeTests/GetPrerequisitesTest.cmake.in |   14 ++++++++++++++
 3 files changed, 25 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list