[Cmake-commits] CMake branch, next, updated. v3.8.0-rc2-524-gf5594b1

Kitware Robot kwrobot at kitware.com
Mon Mar 20 16:25:10 EDT 2017


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  f5594b1892838f1721f703e2d062652fca0791ef (commit)
       via  2e900f1ec56b82b08fcd1a847a3c7317ebad2e2f (commit)
      from  c88ba48302201816b1438f0647a3577b4291ce37 (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f5594b1892838f1721f703e2d062652fca0791ef
commit f5594b1892838f1721f703e2d062652fca0791ef
Merge: c88ba48 2e900f1
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Mar 20 20:24:51 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Mar 20 16:24:53 2017 -0400

    Stage topic 'CPackComponent-use-cmake_parse_arguments'
    
    Topic-id: 23074
    Topic-url: https://gitlab.kitware.com/cmake/cmake/merge_requests/588


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2e900f1ec56b82b08fcd1a847a3c7317ebad2e2f
commit 2e900f1ec56b82b08fcd1a847a3c7317ebad2e2f
Author:     Daniel Pfeifer <daniel at pfeifer-mail.de>
AuthorDate: Wed Mar 15 18:10:33 2017 +0100
Commit:     Daniel Pfeifer <daniel at pfeifer-mail.de>
CommitDate: Wed Mar 15 18:10:33 2017 +0100

    CPackComponent: use cmake_parse_arguments

diff --git a/Modules/CPackComponent.cmake b/Modules/CPackComponent.cmake
index 395a268..2adc9b9 100644
--- a/Modules/CPackComponent.cmake
+++ b/Modules/CPackComponent.cmake
@@ -303,38 +303,6 @@
 if(NOT CPackComponent_CMake_INCLUDED)
 set(CPackComponent_CMake_INCLUDED 1)
 
-# Argument-parsing macro from https://cmake.org/Wiki/CMakeMacroParseArguments
-macro(cpack_parse_arguments prefix arg_names option_names)
-  set(${prefix}_DEFAULT_ARGS)
-  foreach(arg_name ${arg_names})
-    set(${prefix}_${arg_name})
-  endforeach()
-  foreach(option ${option_names})
-    set(${prefix}_${option} FALSE)
-  endforeach()
-
-  set(current_arg_name DEFAULT_ARGS)
-  set(current_arg_list)
-  foreach(arg ${ARGN})
-    set(larg_names ${arg_names})
-    list(FIND larg_names "${arg}" is_arg_name)
-    if (is_arg_name GREATER -1)
-      set(${prefix}_${current_arg_name} ${current_arg_list})
-      set(current_arg_name ${arg})
-      set(current_arg_list)
-    else ()
-      set(loption_names ${option_names})
-      list(FIND loption_names "${arg}" is_option)
-      if (is_option GREATER -1)
-        set(${prefix}_${arg} TRUE)
-      else ()
-        set(current_arg_list ${current_arg_list} ${arg})
-      endif ()
-    endif ()
-  endforeach()
-  set(${prefix}_${current_arg_name} ${current_arg_list})
-endmacro()
-
 # Macro that appends a SET command for the given variable name (var)
 # to the macro named strvar, but only if the variable named "var"
 # has been defined. The string will eventually be appended to a CPack
@@ -392,9 +360,10 @@ endmacro()
 # Macro that adds a component to the CPack installer
 macro(cpack_add_component compname)
   string(TOUPPER ${compname} _CPACK_ADDCOMP_UNAME)
-  cpack_parse_arguments(CPACK_COMPONENT_${_CPACK_ADDCOMP_UNAME}
-    "DISPLAY_NAME;DESCRIPTION;GROUP;DEPENDS;INSTALL_TYPES;ARCHIVE_FILE;PLIST"
+  cmake_parse_arguments(CPACK_COMPONENT_${_CPACK_ADDCOMP_UNAME}
     "HIDDEN;REQUIRED;DISABLED;DOWNLOADED"
+    "DISPLAY_NAME;DESCRIPTION;GROUP;ARCHIVE_FILE;PLIST"
+    "DEPENDS;INSTALL_TYPES"
     ${ARGN}
     )
 
@@ -464,9 +433,10 @@ endmacro()
 # Macro that adds a component group to the CPack installer
 macro(cpack_add_component_group grpname)
   string(TOUPPER ${grpname} _CPACK_ADDGRP_UNAME)
-  cpack_parse_arguments(CPACK_COMPONENT_GROUP_${_CPACK_ADDGRP_UNAME}
-    "DISPLAY_NAME;DESCRIPTION;PARENT_GROUP"
+  cmake_parse_arguments(CPACK_COMPONENT_GROUP_${_CPACK_ADDGRP_UNAME}
     "EXPANDED;BOLD_TITLE"
+    "DISPLAY_NAME;DESCRIPTION;PARENT_GROUP"
+    ""
     ${ARGN}
     )
 
@@ -498,7 +468,8 @@ endmacro()
 # Macro that adds an installation type to the CPack installer
 macro(cpack_add_install_type insttype)
   string(TOUPPER ${insttype} _CPACK_INSTTYPE_UNAME)
-  cpack_parse_arguments(CPACK_INSTALL_TYPE_${_CPACK_INSTTYPE_UNAME}
+  cmake_parse_arguments(CPACK_INSTALL_TYPE_${_CPACK_INSTTYPE_UNAME}
+    ""
     "DISPLAY_NAME"
     ""
     ${ARGN}
@@ -521,9 +492,10 @@ macro(cpack_add_install_type insttype)
 endmacro()
 
 macro(cpack_configure_downloads site)
-  cpack_parse_arguments(CPACK_DOWNLOAD
-    "UPLOAD_DIRECTORY"
+  cmake_parse_arguments(CPACK_DOWNLOAD
     "ALL;ADD_REMOVE;NO_ADD_REMOVE"
+    "UPLOAD_DIRECTORY"
+    ""
     ${ARGN}
     )
 

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

Summary of changes:
 Modules/CPackComponent.cmake |   50 ++++++++++--------------------------------
 1 file changed, 11 insertions(+), 39 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list