[Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-831-gca6683c

Brad King brad.king at kitware.com
Tue Nov 25 10:14:21 EST 2014


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  ca6683c0694bac1ae8a20235c5bf0705f8e0e323 (commit)
       via  d1903de8c5bac7b134d5f77359be48aa4386afa9 (commit)
       via  c9e32b0b122cb8d051c90bcc872244614ec40a39 (commit)
      from  eab6e80949d92bcc3cf78849a2636c1b4f1e613d (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=ca6683c0694bac1ae8a20235c5bf0705f8e0e323
commit ca6683c0694bac1ae8a20235c5bf0705f8e0e323
Merge: eab6e80 d1903de
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Nov 25 10:14:20 2014 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Nov 25 10:14:20 2014 -0500

    Merge topic 'GetPrerequisites-expansion' into next
    
    d1903de8 GetPrerequisites: join if() clauses
    c9e32b0b GetPrerequisites: remove needless variable dereferencing


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d1903de8c5bac7b134d5f77359be48aa4386afa9
commit d1903de8c5bac7b134d5f77359be48aa4386afa9
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Tue Nov 18 20:37:33 2014 +0100
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Nov 25 10:13:20 2014 -0500

    GetPrerequisites: join if() clauses
    
    These all test the same variable for different values, so only one of them can
    ever be true. This also allows to completely remove one variable that only
    flagged if one of the conditions matched.

diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake
index 9813275..712a41c 100644
--- a/Modules/GetPrerequisites.cmake
+++ b/Modules/GetPrerequisites.cmake
@@ -666,45 +666,31 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
     return()
   endif()
 
-  set(gp_tool_known 0)
-
   if(gp_tool STREQUAL "ldd")
     set(gp_cmd_args "")
     set(gp_regex "^[\t ]*[^\t ]+ => ([^\t\(]+) .*${eol_char}$")
     set(gp_regex_error "not found${eol_char}$")
     set(gp_regex_fallback "^[\t ]*([^\t ]+) => ([^\t ]+).*${eol_char}$")
     set(gp_regex_cmp_count 1)
-    set(gp_tool_known 1)
-  endif()
-
-  if(gp_tool STREQUAL "otool")
+  elseif(gp_tool STREQUAL "otool")
     set(gp_cmd_args "-L")
     set(gp_regex "^\t([^\t]+) \\(compatibility version ([0-9]+.[0-9]+.[0-9]+), current version ([0-9]+.[0-9]+.[0-9]+)\\)${eol_char}$")
     set(gp_regex_error "")
     set(gp_regex_fallback "")
     set(gp_regex_cmp_count 3)
-    set(gp_tool_known 1)
-  endif()
-
-  if(gp_tool STREQUAL "dumpbin")
+  elseif(gp_tool STREQUAL "dumpbin")
     set(gp_cmd_args "/dependents")
     set(gp_regex "^    ([^ ].*[Dd][Ll][Ll])${eol_char}$")
     set(gp_regex_error "")
     set(gp_regex_fallback "")
     set(gp_regex_cmp_count 1)
-    set(gp_tool_known 1)
-  endif()
-
-  if(gp_tool STREQUAL "objdump")
+  elseif(gp_tool STREQUAL "objdump")
     set(gp_cmd_args "-p")
     set(gp_regex "^\t*DLL Name: (.*\\.[Dd][Ll][Ll])${eol_char}$")
     set(gp_regex_error "")
     set(gp_regex_fallback "")
     set(gp_regex_cmp_count 1)
-    set(gp_tool_known 1)
-  endif()
-
-  if(NOT gp_tool_known)
+  else()
     message(STATUS "warning: gp_tool='${gp_tool}' is an unknown tool...")
     message(STATUS "CMake function get_prerequisites needs more code to handle '${gp_tool}'")
     message(STATUS "Valid gp_tool values are dumpbin, ldd, objdump and otool.")

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c9e32b0b122cb8d051c90bcc872244614ec40a39
commit c9e32b0b122cb8d051c90bcc872244614ec40a39
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Tue Nov 18 18:43:27 2014 +0100
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Nov 25 10:13:20 2014 -0500

    GetPrerequisites: remove needless variable dereferencing

diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake
index 9963517..9813275 100644
--- a/Modules/GetPrerequisites.cmake
+++ b/Modules/GetPrerequisites.cmake
@@ -179,7 +179,7 @@ function(gp_append_unique list_var value)
   set(contains 0)
 
   foreach(item ${${list_var}})
-    if("${item}" STREQUAL "${value}")
+    if(item STREQUAL "${value}")
       set(contains 1)
       break()
     endif()
@@ -546,14 +546,14 @@ function(gp_resolved_file_type original_file file exepath dirs type_var)
     if(NOT is_system)
       get_filename_component(original_path "${original_lower}" PATH)
       get_filename_component(path "${lower}" PATH)
-      if("${original_path}" STREQUAL "${path}")
+      if(original_path STREQUAL path)
         set(is_local 1)
       else()
         string(LENGTH "${original_path}/" original_length)
         string(LENGTH "${lower}" path_length)
         if(${path_length} GREATER ${original_length})
           string(SUBSTRING "${lower}" 0 ${original_length} path)
-          if("${original_path}/" STREQUAL "${path}")
+          if("${original_path}/" STREQUAL path)
             set(is_embedded 1)
           endif()
         endif()
@@ -642,7 +642,7 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
   # Try to choose the right tool by default. Caller can set gp_tool prior to
   # calling this function to force using a different tool.
   #
-  if("${gp_tool}" STREQUAL "")
+  if(NOT gp_tool)
     set(gp_tool "ldd")
 
     if(APPLE)
@@ -668,7 +668,7 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
 
   set(gp_tool_known 0)
 
-  if("${gp_tool}" STREQUAL "ldd")
+  if(gp_tool STREQUAL "ldd")
     set(gp_cmd_args "")
     set(gp_regex "^[\t ]*[^\t ]+ => ([^\t\(]+) .*${eol_char}$")
     set(gp_regex_error "not found${eol_char}$")
@@ -677,7 +677,7 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
     set(gp_tool_known 1)
   endif()
 
-  if("${gp_tool}" STREQUAL "otool")
+  if(gp_tool STREQUAL "otool")
     set(gp_cmd_args "-L")
     set(gp_regex "^\t([^\t]+) \\(compatibility version ([0-9]+.[0-9]+.[0-9]+), current version ([0-9]+.[0-9]+.[0-9]+)\\)${eol_char}$")
     set(gp_regex_error "")
@@ -686,7 +686,7 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
     set(gp_tool_known 1)
   endif()
 
-  if("${gp_tool}" STREQUAL "dumpbin")
+  if(gp_tool STREQUAL "dumpbin")
     set(gp_cmd_args "/dependents")
     set(gp_regex "^    ([^ ].*[Dd][Ll][Ll])${eol_char}$")
     set(gp_regex_error "")
@@ -695,7 +695,7 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
     set(gp_tool_known 1)
   endif()
 
-  if("${gp_tool}" STREQUAL "objdump")
+  if(gp_tool STREQUAL "objdump")
     set(gp_cmd_args "-p")
     set(gp_regex "^\t*DLL Name: (.*\\.[Dd][Ll][Ll])${eol_char}$")
     set(gp_regex_error "")
@@ -712,7 +712,7 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
   endif()
 
 
-  if("${gp_tool}" STREQUAL "dumpbin")
+  if(gp_tool STREQUAL "dumpbin")
     # When running dumpbin, it also needs the "Common7/IDE" directory in the
     # PATH. It will already be in the PATH if being run from a Visual Studio
     # command prompt. Add it to the PATH here in case we are running from a
@@ -727,7 +727,7 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
       set(gp_found_cmd_dlls_dir 0)
       file(TO_CMAKE_PATH "$ENV{PATH}" env_path)
       foreach(gp_env_path_element ${env_path})
-        if("${gp_env_path_element}" STREQUAL "${gp_cmd_dlls_dir}")
+        if(gp_env_path_element STREQUAL gp_cmd_dlls_dir)
           set(gp_found_cmd_dlls_dir 1)
         endif()
       endforeach()
@@ -741,7 +741,7 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
   #
   # </setup-gp_tool-vars>
 
-  if("${gp_tool}" STREQUAL "ldd")
+  if(gp_tool STREQUAL "ldd")
     set(old_ld_env "$ENV{LD_LIBRARY_PATH}")
     set(new_ld_env "${exepath}")
     foreach(dir ${dirs})
@@ -763,7 +763,7 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
     OUTPUT_VARIABLE gp_cmd_ov
     )
 
-  if("${gp_tool}" STREQUAL "ldd")
+  if(gp_tool STREQUAL "ldd")
     set(ENV{LD_LIBRARY_PATH} "${old_ld_env}")
   endif()
 
@@ -783,7 +783,7 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
   # check for install id and remove it from list, since otool -L can include a
   # reference to itself
   set(gp_install_id)
-  if("${gp_tool}" STREQUAL "otool")
+  if(gp_tool STREQUAL "otool")
     execute_process(
       COMMAND otool -D ${target}
       OUTPUT_VARIABLE gp_install_id_ov
@@ -833,7 +833,7 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
     #
     set(add_item 1)
 
-    if("${item}" STREQUAL "${gp_install_id}")
+    if(item STREQUAL gp_install_id)
       set(add_item 0)
     endif()
 
@@ -841,7 +841,7 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
       set(type "")
       gp_resolved_file_type("${target}" "${item}" "${exepath}" "${dirs}" type "${rpaths}")
 
-      if("${type}" STREQUAL "system")
+      if(type STREQUAL "system")
         set(add_item 0)
       endif()
     endif()

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

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list