[Cmake-commits] CMake branch, master, updated. v3.13.0-rc3-437-g64bc4bd

Kitware Robot kwrobot at kitware.com
Tue Nov 13 14:33:04 EST 2018


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, master has been updated
       via  64bc4bda748b6c33d496fe294e959e7609b89260 (commit)
       via  dc551c2b0d8d92227a56faad80781349381869f2 (commit)
       via  abb5945bd0b10b14cdc43966145b1a34125393cc (commit)
       via  357cdee3a133a943828d85d6441dfdee9d347751 (commit)
       via  df780bcc018f65b6b182028df06dcd03ca10a4e7 (commit)
      from  3603b3964b308273725198cafdc2ce78a80fa862 (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=64bc4bda748b6c33d496fe294e959e7609b89260
commit 64bc4bda748b6c33d496fe294e959e7609b89260
Merge: dc551c2 df780bc
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Nov 13 19:25:10 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Tue Nov 13 14:25:58 2018 -0500

    Merge topic 'deprecate-modules2'
    
    df780bcc01 Help: Move deprecated modules to appropriate section.
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2603


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dc551c2b0d8d92227a56faad80781349381869f2
commit dc551c2b0d8d92227a56faad80781349381869f2
Merge: 3603b39 abb5945
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Nov 13 19:25:03 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Tue Nov 13 14:25:10 2018 -0500

    Merge topic 'macro+function-invocation'
    
    abb5945bd0 Help: Document that function invocation is case-insensitive
    357cdee3a1 Help: Document that macro invocation is case-insensitive
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2607


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=abb5945bd0b10b14cdc43966145b1a34125393cc
commit abb5945bd0b10b14cdc43966145b1a34125393cc
Author:     Joachim Wuttke (l) <j.wuttke at fz-juelich.de>
AuthorDate: Mon Nov 12 23:07:59 2018 +0100
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Nov 13 13:47:26 2018 -0500

    Help: Document that function invocation is case-insensitive

diff --git a/Help/command/function.rst b/Help/command/function.rst
index 4a223b4..7b10381 100644
--- a/Help/command/function.rst
+++ b/Help/command/function.rst
@@ -9,27 +9,9 @@ Start recording a function for later invocation as a command.
     <commands>
   endfunction()
 
-Defines a function named ``<name>`` that takes arguments
-named ``<arg1>``, ...
-The ``<commands>`` in the function definition are recorded;
-they are not invoked until the function is invoked. When
-the function is invoked, the recorded ``<commands>`` are first
-modified by replacing formal parameters (``${arg1}``, ...)
-with the arguments passed, and then invoked as normal commands.
-
-In addition to referencing the formal parameters you can reference the
-``ARGC`` variable which will be set to the number of arguments passed
-into the function as well as ``ARGV0``, ``ARGV1``, ``ARGV2``, ...  which
-will have the actual values of the arguments passed in.
-This facilitates creating functions with optional arguments.
-
-Furthermore, ``ARGV`` holds the list of all arguments given to the
-function and ``ARGN`` holds the list of arguments past the last expected
-argument.
-Referencing to ``ARGV#`` arguments beyond ``ARGC`` have undefined
-behavior. Checking that ``ARGC`` is greater than ``#`` is the only way
-to ensure that ``ARGV#`` was passed to the function as an extra
-argument.
+Defines a function named ``<name>`` that takes arguments named
+``<arg1>``, ...  The ``<commands>`` in the function definition
+are recorded; they are not executed until the function is invoked.
 
 Per legacy, the :command:`endfunction` command admits an optional
 ``<name>`` argument. If used, it must be a verbatim repeat of the
@@ -40,3 +22,46 @@ details.
 
 See the :command:`cmake_policy()` command documentation for the behavior
 of policies inside functions.
+
+Invocation
+^^^^^^^^^^
+
+The function invocation is case-insensitive. A function defined as
+
+.. code-block:: cmake
+
+  function(foo)
+    <commands>
+  endfunction()
+
+can be invoked through any of
+
+.. code-block:: cmake
+
+  foo()
+  Foo()
+  FOO()
+
+and so on. However, it is strongly recommended to stay with the
+case chosen in the function definition. Typically functions use
+all-lowercase names.
+
+Arguments
+^^^^^^^^^
+
+When the function is invoked, the recorded ``<commands>`` are first
+modified by replacing formal parameters (``${arg1}``, ...) with the
+arguments passed, and then invoked as normal commands.
+
+In addition to referencing the formal parameters you can reference the
+``ARGC`` variable which will be set to the number of arguments passed
+into the function as well as ``ARGV0``, ``ARGV1``, ``ARGV2``, ...  which
+will have the actual values of the arguments passed in.  This facilitates
+creating functions with optional arguments.
+
+Furthermore, ``ARGV`` holds the list of all arguments given to the
+function and ``ARGN`` holds the list of arguments past the last expected
+argument.  Referencing to ``ARGV#`` arguments beyond ``ARGC`` have
+undefined behavior.  Checking that ``ARGC`` is greater than ``#`` is
+the only way to ensure that ``ARGV#`` was passed to the function as an
+extra argument.

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=357cdee3a133a943828d85d6441dfdee9d347751
commit 357cdee3a133a943828d85d6441dfdee9d347751
Author:     Joachim Wuttke (l) <j.wuttke at fz-juelich.de>
AuthorDate: Mon Nov 12 22:58:20 2018 +0100
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Nov 13 13:47:24 2018 -0500

    Help: Document that macro invocation is case-insensitive

diff --git a/Help/command/macro.rst b/Help/command/macro.rst
index 287855b..e15e206 100644
--- a/Help/command/macro.rst
+++ b/Help/command/macro.rst
@@ -9,12 +9,46 @@ Start recording a macro for later invocation as a command
     <commands>
   endmacro()
 
-Defines a macro named ``<name>`` that takes arguments
-named ``<arg1>``, ...
-Commands listed after macro, but before the matching
-:command:`endmacro()`, are not invoked until the macro is invoked.
-When it is invoked, the commands recorded in the macro are first
-modified by replacing formal parameters (``${arg1}``, ...)
+Defines a macro named ``<name>`` that takes arguments named
+``<arg1>``, ... Commands listed after macro, but before the
+matching :command:`endmacro()`, are not executed until the macro
+is invoked.
+
+Per legacy, the :command:`endmacro` command admits an optional
+``<name>`` argument. If used, it must be a verbatim repeat of the
+argument of the opening ``macro`` command.
+
+See the :command:`cmake_policy()` command documentation for the behavior
+of policies inside macros.
+
+Invocation
+^^^^^^^^^^
+
+The macro invocation is case-insensitive. A macro defined as
+
+.. code-block:: cmake
+
+  macro(foo)
+    <commands>
+  endmacro()
+
+can be invoked through any of
+
+.. code-block:: cmake
+
+  foo()
+  Foo()
+  FOO()
+
+and so on. However, it is strongly recommended to stay with the
+case chosen in the macro definition.  Typically macros use
+all-lowercase names.
+
+Arguments
+^^^^^^^^^
+
+When a macro is invoked, the commands recorded in the macro are
+first modified by replacing formal parameters (``${arg1}``, ...)
 with the arguments passed, and then invoked as normal commands.
 
 In addition to referencing the formal parameters you can reference the
@@ -31,16 +65,8 @@ behavior. Checking that ``${ARGC}`` is greater than ``#`` is the only
 way to ensure that ``${ARGV#}`` was passed to the function as an extra
 argument.
 
-Per legacy, the :command:`endmacro` command admits an optional
-``<name>`` argument. If used, it must be a verbatim repeat of the
-argument of the opening ``macro`` command.
-
-
-See the :command:`cmake_policy()` command documentation for the behavior
-of policies inside macros.
-
-Macro Argument Caveats
-^^^^^^^^^^^^^^^^^^^^^^
+Argument Caveats
+^^^^^^^^^^^^^^^^
 
 Note that the parameters to a macro and values such as ``ARGN`` are
 not variables in the usual CMake sense.  They are string

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=df780bcc018f65b6b182028df06dcd03ca10a4e7
commit df780bcc018f65b6b182028df06dcd03ca10a4e7
Author:     Joachim Wuttke (l) <j.wuttke at fz-juelich.de>
AuthorDate: Mon Nov 12 22:13:12 2018 +0100
Commit:     Joachim Wuttke (o) <j.wuttke at fz-juelich.de>
CommitDate: Tue Nov 13 13:06:30 2018 +0100

    Help: Move deprecated modules to appropriate section.
    
    Move deprecated or obsolete modules to the section
    "Deprectated Modules" of cmake-modules(7):
    
    - MacroAddFileDependencies (Text says: Using the macro
      MACRO_ADD_FILE_DEPENDENCIES() is discouraged.)
    - UsePkgConfig (Text calls it "obsolete")
    - Use_wxWindows (was already listed in deprecation section)

diff --git a/Help/manual/cmake-modules.7.rst b/Help/manual/cmake-modules.7.rst
index 266c7a1..57dcac2 100644
--- a/Help/manual/cmake-modules.7.rst
+++ b/Help/manual/cmake-modules.7.rst
@@ -76,7 +76,6 @@ These modules are loaded using the :command:`include` command.
    /module/GNUInstallDirs
    /module/GoogleTest
    /module/InstallRequiredSystemLibraries
-   /module/MacroAddFileDependencies
    /module/ProcessorCount
    /module/SelectLibraryConfigurations
    /module/SquishTestScript
@@ -89,10 +88,8 @@ These modules are loaded using the :command:`include` command.
    /module/UseJavaClassFilelist
    /module/UseJava
    /module/UseJavaSymlinks
-   /module/UsePkgConfig
    /module/UseSWIG
    /module/UsewxWidgets
-   /module/Use_wxWindows
    /module/WriteCompilerDetectionHeader
 
 Find Modules
@@ -270,7 +267,9 @@ Deprecated Utility Modules
    /module/CMakeExpandImportedTargets
    /module/CMakeForceCompiler
    /module/CMakeParseArguments
+   /module/MacroAddFileDependencies
    /module/TestCXXAcceptsFlag
+   /module/UsePkgConfig
    /module/Use_wxWindows
    /module/WriteBasicConfigVersionFile
 

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

Summary of changes:
 Help/command/function.rst       | 67 ++++++++++++++++++++++++++++-------------
 Help/command/macro.rst          | 58 +++++++++++++++++++++++++----------
 Help/manual/cmake-modules.7.rst |  5 ++-
 3 files changed, 90 insertions(+), 40 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list