[Cmake-commits] CMake branch, next, updated. v3.2.2-1834-gc6d9edd

Brad King brad.king at kitware.com
Wed Apr 15 11:33:59 EDT 2015


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  c6d9edd1dfd21bbb3fb1d99053d90114be6c3260 (commit)
       via  6470bb7f1fcf6d1559750ddbd7bc87a8f8e7f9de (commit)
       via  17d9a62b3d30075657c147b66550e41c6ed19efb (commit)
       via  338c17b52b7287c76adf70221ac8075ca7649a1c (commit)
      from  251e719cc10593dc4fd0fd1f4e9b3a6d59a55f86 (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=c6d9edd1dfd21bbb3fb1d99053d90114be6c3260
commit c6d9edd1dfd21bbb3fb1d99053d90114be6c3260
Merge: 251e719 6470bb7
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Apr 15 11:33:58 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Apr 15 11:33:58 2015 -0400

    Merge topic 'FPHSA-updates' into next
    
    6470bb7f FPHSA: Document REQUIRED_VARS recommendation (#15352)
    17d9a62b FPHSA: Revise and format documentation
    338c17b5 FPHSA: Always populate the ExactCase_FOUND variable (#15412).


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6470bb7f1fcf6d1559750ddbd7bc87a8f8e7f9de
commit 6470bb7f1fcf6d1559750ddbd7bc87a8f8e7f9de
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Apr 15 11:32:26 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Apr 15 11:32:50 2015 -0400

    FPHSA: Document REQUIRED_VARS recommendation (#15352)
    
    State explicitly that the variables specified are user-facing.

diff --git a/Modules/FindPackageHandleStandardArgs.cmake b/Modules/FindPackageHandleStandardArgs.cmake
index 9053af3..6fdc917 100644
--- a/Modules/FindPackageHandleStandardArgs.cmake
+++ b/Modules/FindPackageHandleStandardArgs.cmake
@@ -49,6 +49,10 @@ valid filepaths.
 
   ``REQUIRED_VARS <required-var>...``
     Specify the variables which are required for this package.
+    These may be named in the generated failure message asking the
+    user to set the missing variable values.  Therefore these should
+    typically be cache entries such as ``FOO_LIBRARY`` and not output
+    variables like ``FOO_LIBRARIES``.
 
   ``VERSION_VAR <version-var>``
     Specify the name of a variable that holds the version of the package

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=17d9a62b3d30075657c147b66550e41c6ed19efb
commit 17d9a62b3d30075657c147b66550e41c6ed19efb
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Apr 15 11:30:28 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Apr 15 11:30:40 2015 -0400

    FPHSA: Revise and format documentation
    
    Use better reStructuredText markup and add cross-references.

diff --git a/Modules/FindPackageHandleStandardArgs.cmake b/Modules/FindPackageHandleStandardArgs.cmake
index e7b2d95..9053af3 100644
--- a/Modules/FindPackageHandleStandardArgs.cmake
+++ b/Modules/FindPackageHandleStandardArgs.cmake
@@ -1,113 +1,126 @@
-#.rst:
-# FindPackageHandleStandardArgs
-# -----------------------------
-#
-#
-#
-# FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name> ...  )
-#
-# This function is intended to be used in FindXXX.cmake modules files.
-# It handles the REQUIRED, QUIET and version-related arguments to
-# find_package(PackageName).  It also sets the <PackageName>_FOUND
-# variable.  The package is considered found if all variables <var1>...
-# listed contain valid results, e.g.  valid filepaths.
-#
-# There are two modes of this function.  The first argument in both
-# modes is the name of the Find-module where it is called (in original
-# casing).
-#
-# The first simple mode looks like this:
-#
-# ::
-#
-#     FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name>
-#       (DEFAULT_MSG|"Custom failure message") <var1>...<varN> )
-#
-# If the variables <var1> to <varN> are all valid, then
-# <PackageName>_FOUND will be set to TRUE.  If DEFAULT_MSG is given
-# as second argument, then the function will generate itself useful
-# success and error messages.  You can also supply a custom error
-# message for the failure case.  This is not recommended.
-#
-# The second mode is more powerful and also supports version checking:
-#
-# ::
-#
-#     FIND_PACKAGE_HANDLE_STANDARD_ARGS(<NAME>
-#       [FOUND_VAR <resultVar>]
-#       [REQUIRED_VARS <var1>...<varN>]
-#       [VERSION_VAR   <versionvar>]
-#       [HANDLE_COMPONENTS]
-#       [CONFIG_MODE]
-#       [FAIL_MESSAGE "Custom failure message"] )
-#
-# The FOUND_VAR option is obsolete.  ``FIND_PACKAGE_HANDLE_STANDARD_ARGS``
-# always populates ``<PackageName>_FOUND``.  For backward compatibility,
-# it also always populates ``<UPPERCASE_NAME>_FOUND``.
-#
-# As in the simple mode, if <var1> through <varN> are all valid,
-# <PackageName>_FOUND will be set to TRUE.  After REQUIRED_VARS the
-# variables which are required for this package are listed.  Following
-# VERSION_VAR the name of the variable can be specified which holds the
-# version of the package which has been found.  If this is done, this
-# version will be checked against the (potentially) specified required
-# version used in the find_package() call.  The EXACT keyword is also
-# handled.  The default messages include information about the required
-# version and the version which has been actually found, both if the
-# version is ok or not.  If the package supports components, use the
-# HANDLE_COMPONENTS option to enable handling them.  In this case,
-# find_package_handle_standard_args() will report which components have
-# been found and which are missing, and the <PackageName>_FOUND variable
-# will be set to FALSE if any of the required components (i.e.  not the
-# ones listed after OPTIONAL_COMPONENTS) are missing.  Use the option
-# CONFIG_MODE if your FindXXX.cmake module is a wrapper for a
-# find_package(...  NO_MODULE) call.  In this case VERSION_VAR will be
-# set to <NAME>_VERSION and the macro will automatically check whether
-# the Config module was found.  Via FAIL_MESSAGE a custom failure
-# message can be specified, if this is not used, the default message
-# will be displayed.
-#
-# Example for mode 1:
-#
-# ::
-#
-#     find_package_handle_standard_args(LibXml2  DEFAULT_MSG
-#       LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
-#
-#
-#
-# LibXml2 is considered to be found, if both LIBXML2_LIBRARY and
-# LIBXML2_INCLUDE_DIR are valid.  Then also LibXml2_FOUND is set to
-# TRUE.  If it is not found and REQUIRED was used, it fails with
-# FATAL_ERROR, independent whether QUIET was used or not.  If it is
-# found, success will be reported, including the content of <var1>.  On
-# repeated Cmake runs, the same message won't be printed again.
-#
-# Example for mode 2:
-#
-# ::
-#
-#     find_package_handle_standard_args(LibXslt
-#       REQUIRED_VARS LibXslt_LIBRARIES LibXslt_INCLUDE_DIRS
-#       VERSION_VAR LibXslt_VERSION_STRING)
-#
-# In this case, LibXslt is considered to be found if the variable(s)
-# listed after REQUIRED_VAR are all valid, i.e.  LibXslt_LIBRARIES and
-# LibXslt_INCLUDE_DIRS in this case.  Also the version of LibXslt will be
-# checked by using the version contained in LibXslt_VERSION_STRING.  Since
-# no FAIL_MESSAGE is given, the default messages will be printed.
-#
-# Another example for mode 2:
-#
-# ::
-#
-#     find_package(Automoc4 QUIET NO_MODULE HINTS /opt/automoc4)
-#     find_package_handle_standard_args(Automoc4  CONFIG_MODE)
-#
-# In this case, FindAutmoc4.cmake wraps a call to find_package(Automoc4
-# NO_MODULE) and adds an additional search directory for automoc4.  The
-# following FIND_PACKAGE_HANDLE_STANDARD_ARGS() call produces a proper
-# success/error message.
+#[=======================================================================[.rst:
+FindPackageHandleStandardArgs
+-----------------------------
+
+This module provides a function intended to be used in :ref:`Find Modules`
+implementing :command:`find_package(<PackageName>)` calls.  It handles the
+``REQUIRED``, ``QUIET`` and version-related arguments of ``find_package``.
+It also sets the ``<PackageName>_FOUND`` variable.  The package is
+considered found if all variables listed contain valid results, e.g.
+valid filepaths.
+
+.. command:: find_package_handle_standard_args
+
+  There are two signatures::
+
+    find_package_handle_standard_args(<PackageName>
+      (DEFAULT_MSG|<custom-failure-message>)
+      <required-var>...
+      )
+
+    find_package_handle_standard_args(<PackageName>
+      [FOUND_VAR <result-var>]
+      [REQUIRED_VARS <required-var>...]
+      [VERSION_VAR <version-var>]
+      [HANDLE_COMPONENTS]
+      [CONFIG_MODE]
+      [FAIL_MESSAGE <custom-failure-message>]
+      )
+
+  The ``<PackageName>_FOUND`` variable will be set to ``TRUE`` if all
+  the variables ``<required-var>...`` are valid and any optional
+  constraints are satisfied, and ``FALSE`` otherwise.  A success or
+  failure message may be displayed based on the results and on
+  whether the ``REQUIRED`` and/or ``QUIET`` option was given to
+  the :command:`find_package` call.
+
+  The options are:
+
+  ``(DEFAULT_MSG|<custom-failure-message>)``
+    In the simple signature this specifies the failure message.
+    Use ``DEFAULT_MSG`` to ask for a default message to be computed
+    (recommended).  Not valid in the full signature.
+
+  ``FOUND_VAR <result-var>``
+    Obselete.  Specifies either ``<PackageName>_FOUND`` or
+    ``<PACKAGENAME>_FOUND`` as the result variable.  This exists only
+    for compatibility with older versions of CMake and is now ignored.
+    Result variables of both names are always set for compatibility.
+
+  ``REQUIRED_VARS <required-var>...``
+    Specify the variables which are required for this package.
+
+  ``VERSION_VAR <version-var>``
+    Specify the name of a variable that holds the version of the package
+    that has been found.  This version will be checked against the
+    (potentially) specified required version given to the
+    :command:`find_package` call, including its ``EXACT`` option.
+    The default messages include information about the required
+    version and the version which has been actually found, both
+    if the version is ok or not.
+
+  ``HANDLE_COMPONENTS``
+    Enable handling of package components.  In this case, the command
+    will report which components have been found and which are missing,
+    and the ``<PackageName>_FOUND`` variable will be set to ``FALSE``
+    if any of the required components (i.e. not the ones listed after
+    the ``OPTIONAL_COMPONENTS`` option of :command:`find_package`) are
+    missing.
+
+  ``CONFIG_MODE``
+    Specify that the calling find module is a wrapper around a
+    call to ``find_package(<PackageName> NO_MODULE)``.  This implies
+    a ``VERSION_VAR`` value of ``<PackageName>_VERSION``.  The command
+    will automatically check whether the package configuration file
+    was found.
+
+  ``FAIL_MESSAGE <custom-failure-message>``
+    Specify a custom failure message instead of using the default
+    generated message.  Not recommended.
+
+Example for the simple signature:
+
+.. code-block:: cmake
+
+  find_package_handle_standard_args(LibXml2 DEFAULT_MSG
+    LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
+
+The ``LibXml2`` package is considered to be found if both
+``LIBXML2_LIBRARY`` and ``LIBXML2_INCLUDE_DIR`` are valid.
+Then also ``LibXml2_FOUND`` is set to ``TRUE``.  If it is not found
+and ``REQUIRED`` was used, it fails with a
+:command:`message(FATAL_ERROR)`, independent whether ``QUIET`` was
+used or not.  If it is found, success will be reported, including
+the content of the first ``<required-var>``.  On repeated CMake runs,
+the same message will not be printed again.
+
+Example for the full signature:
+
+.. code-block:: cmake
+
+  find_package_handle_standard_args(LibArchive
+    REQUIRED_VARS LibArchive_LIBRARY LibArchive_INCLUDE_DIR
+    VERSION_VAR LibArchive_VERSION)
+
+In this case, the ``LibArchive`` package is considered to be found if
+both ``LibArchive_LIBRARY`` and ``LibArchive_INCLUDE_DIR`` are valid.
+Also the version of ``LibArchive`` will be checked by using the version
+contained in ``LibArchive_VERSION``.  Since no ``FAIL_MESSAGE`` is given,
+the default messages will be printed.
+
+Another example for the full signature:
+
+.. code-block:: cmake
+
+  find_package(Automoc4 QUIET NO_MODULE HINTS /opt/automoc4)
+  find_package_handle_standard_args(Automoc4  CONFIG_MODE)
+
+In this case, a ``FindAutmoc4.cmake`` module wraps a call to
+``find_package(Automoc4 NO_MODULE)`` and adds an additional search
+directory for ``automoc4``.  Then the call to
+``find_package_handle_standard_args`` produces a proper success/failure
+message.
+#]=======================================================================]
 
 #=============================================================================
 # Copyright 2007-2009 Kitware, Inc.

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=338c17b52b7287c76adf70221ac8075ca7649a1c
commit 338c17b52b7287c76adf70221ac8075ca7649a1c
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Feb 23 22:23:11 2015 +0100
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Apr 15 10:22:00 2015 -0400

    FPHSA: Always populate the ExactCase_FOUND variable (#15412).
    
    The UPPERCASE name was inconsistent with config-packages, the
    find_dependency macro, and even FPHSA itself, which expects
    components to be specified with names matching ExactCase.
    
    The FOUND_VAR was only permitted to have two possible values, and
    now both are set for compatibility.  Document it as obsolete, and
    adjust the code for the same.  Users of the variable should just
    remove it.

diff --git a/Help/release/dev/FPHSA-ExactCase-name.rst b/Help/release/dev/FPHSA-ExactCase-name.rst
new file mode 100644
index 0000000..675547c
--- /dev/null
+++ b/Help/release/dev/FPHSA-ExactCase-name.rst
@@ -0,0 +1,10 @@
+FPHSA-ExactCase-name
+--------------------
+
+* The :module:`FindPackageHandleStandardArgs` module
+  ``FIND_PACKAGE_HANDLE_STANDARD_ARGS`` function now
+  always populates the both ``<PackageName>_FOUND``
+  and ``<UPPERCASE_NAME>_FOUND`` variables (the latter
+  for backwards compatibility).  The ``FOUND_VAR``
+  option is now ignored except to enforce its allowed
+  values.
diff --git a/Modules/FindPackageHandleStandardArgs.cmake b/Modules/FindPackageHandleStandardArgs.cmake
index bcbd17d..e7b2d95 100644
--- a/Modules/FindPackageHandleStandardArgs.cmake
+++ b/Modules/FindPackageHandleStandardArgs.cmake
@@ -8,9 +8,9 @@
 #
 # This function is intended to be used in FindXXX.cmake modules files.
 # It handles the REQUIRED, QUIET and version-related arguments to
-# find_package().  It also sets the <packagename>_FOUND variable.  The
-# package is considered found if all variables <var1>...  listed contain
-# valid results, e.g.  valid filepaths.
+# find_package(PackageName).  It also sets the <PackageName>_FOUND
+# variable.  The package is considered found if all variables <var1>...
+# listed contain valid results, e.g.  valid filepaths.
 #
 # There are two modes of this function.  The first argument in both
 # modes is the name of the Find-module where it is called (in original
@@ -24,7 +24,7 @@
 #       (DEFAULT_MSG|"Custom failure message") <var1>...<varN> )
 #
 # If the variables <var1> to <varN> are all valid, then
-# <UPPERCASED_NAME>_FOUND will be set to TRUE.  If DEFAULT_MSG is given
+# <PackageName>_FOUND will be set to TRUE.  If DEFAULT_MSG is given
 # as second argument, then the function will generate itself useful
 # success and error messages.  You can also supply a custom error
 # message for the failure case.  This is not recommended.
@@ -41,16 +41,12 @@
 #       [CONFIG_MODE]
 #       [FAIL_MESSAGE "Custom failure message"] )
 #
-# In this mode, the name of the result-variable can be set either to
-# either <UPPERCASED_NAME>_FOUND or <OriginalCase_Name>_FOUND using the
-# FOUND_VAR option.  Other names for the result-variable are not
-# allowed.  So for a Find-module named FindFooBar.cmake, the two
-# possible names are FooBar_FOUND and FOOBAR_FOUND.  It is recommended
-# to use the original case version.  If the FOUND_VAR option is not
-# used, the default is <UPPERCASED_NAME>_FOUND.
+# The FOUND_VAR option is obsolete.  ``FIND_PACKAGE_HANDLE_STANDARD_ARGS``
+# always populates ``<PackageName>_FOUND``.  For backward compatibility,
+# it also always populates ``<UPPERCASE_NAME>_FOUND``.
 #
 # As in the simple mode, if <var1> through <varN> are all valid,
-# <packagename>_FOUND will be set to TRUE.  After REQUIRED_VARS the
+# <PackageName>_FOUND will be set to TRUE.  After REQUIRED_VARS the
 # variables which are required for this package are listed.  Following
 # VERSION_VAR the name of the variable can be specified which holds the
 # version of the package which has been found.  If this is done, this
@@ -61,7 +57,7 @@
 # version is ok or not.  If the package supports components, use the
 # HANDLE_COMPONENTS option to enable handling them.  In this case,
 # find_package_handle_standard_args() will report which components have
-# been found and which are missing, and the <packagename>_FOUND variable
+# been found and which are missing, and the <PackageName>_FOUND variable
 # will be set to FALSE if any of the required components (i.e.  not the
 # ones listed after OPTIONAL_COMPONENTS) are missing.  Use the option
 # CONFIG_MODE if your FindXXX.cmake module is a wrapper for a
@@ -81,7 +77,7 @@
 #
 #
 # LibXml2 is considered to be found, if both LIBXML2_LIBRARY and
-# LIBXML2_INCLUDE_DIR are valid.  Then also LIBXML2_FOUND is set to
+# LIBXML2_INCLUDE_DIR are valid.  Then also LibXml2_FOUND is set to
 # TRUE.  If it is not found and REQUIRED was used, it fails with
 # FATAL_ERROR, independent whether QUIET was used or not.  If it is
 # found, success will be reported, including the content of <var1>.  On
@@ -92,16 +88,14 @@
 # ::
 #
 #     find_package_handle_standard_args(LibXslt
-#       FOUND_VAR LibXslt_FOUND
 #       REQUIRED_VARS LibXslt_LIBRARIES LibXslt_INCLUDE_DIRS
 #       VERSION_VAR LibXslt_VERSION_STRING)
 #
 # In this case, LibXslt is considered to be found if the variable(s)
 # listed after REQUIRED_VAR are all valid, i.e.  LibXslt_LIBRARIES and
-# LibXslt_INCLUDE_DIRS in this case.  The result will then be stored in
-# LibXslt_FOUND .  Also the version of LibXslt will be checked by using
-# the version contained in LibXslt_VERSION_STRING.  Since no
-# FAIL_MESSAGE is given, the default messages will be printed.
+# LibXslt_INCLUDE_DIRS in this case.  Also the version of LibXslt will be
+# checked by using the version contained in LibXslt_VERSION_STRING.  Since
+# no FAIL_MESSAGE is given, the default messages will be printed.
 #
 # Another example for mode 2:
 #
@@ -111,9 +105,8 @@
 #     find_package_handle_standard_args(Automoc4  CONFIG_MODE)
 #
 # In this case, FindAutmoc4.cmake wraps a call to find_package(Automoc4
-# NO_MODULE) and adds an additional search directory for automoc4.  Here
-# the result will be stored in AUTOMOC4_FOUND.  The following
-# FIND_PACKAGE_HANDLE_STANDARD_ARGS() call produces a proper
+# NO_MODULE) and adds an additional search directory for automoc4.  The
+# following FIND_PACKAGE_HANDLE_STANDARD_ARGS() call produces a proper
 # success/error message.
 
 #=============================================================================
@@ -239,17 +232,18 @@ function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
   set(MISSING_VARS "")
   set(DETAILS "")
   # check if all passed variables are valid
-  unset(${_FOUND_VAR})
+  unset(${_NAME}_FOUND)
+  unset(${_NAME_UPPER}_FOUND)
   foreach(_CURRENT_VAR ${FPHSA_REQUIRED_VARS})
     if(NOT ${_CURRENT_VAR})
-      set(${_FOUND_VAR} FALSE)
+      set(${_NAME}_FOUND FALSE)
       set(MISSING_VARS "${MISSING_VARS} ${_CURRENT_VAR}")
     else()
       set(DETAILS "${DETAILS}[${${_CURRENT_VAR}}]")
     endif()
   endforeach()
-  if(NOT "${${_FOUND_VAR}}" STREQUAL "FALSE")
-    set(${_FOUND_VAR} TRUE)
+  if(NOT "${${_NAME}_FOUND}" STREQUAL "FALSE")
+    set(${_NAME}_FOUND TRUE)
   endif()
 
   # component handling
@@ -273,7 +267,7 @@ function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
         set(MISSING_COMPONENTS_MSG "${MISSING_COMPONENTS_MSG} ${comp}")
 
         if(${_NAME}_FIND_REQUIRED_${comp})
-          set(${_FOUND_VAR} FALSE)
+          set(${_NAME}_FOUND FALSE)
           set(MISSING_VARS "${MISSING_VARS} ${comp}")
         endif()
 
@@ -356,12 +350,12 @@ function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
   if(VERSION_OK)
     set(DETAILS "${DETAILS}[v${VERSION}(${${_NAME}_FIND_VERSION})]")
   else()
-    set(${_FOUND_VAR} FALSE)
+    set(${_NAME}_FOUND FALSE)
   endif()
 
 
   # print the result:
-  if (${_FOUND_VAR})
+  if (${_NAME}_FOUND)
     FIND_PACKAGE_MESSAGE(${_NAME} "Found ${_NAME}: ${${_FIRST_REQUIRED_VAR}} ${VERSION_MSG} ${COMPONENT_MSG}" "${DETAILS}")
   else ()
 
@@ -377,6 +371,6 @@ function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
 
   endif ()
 
-  set(${_FOUND_VAR} ${${_FOUND_VAR}} PARENT_SCOPE)
-
+  set(${_NAME}_FOUND ${${_NAME}_FOUND} PARENT_SCOPE)
+  set(${_NAME_UPPER}_FOUND ${${_NAME}_FOUND} PARENT_SCOPE)
 endfunction()
diff --git a/Tests/FindPackageTest/CMakeLists.txt b/Tests/FindPackageTest/CMakeLists.txt
index f311fb9..8fafa3b 100644
--- a/Tests/FindPackageTest/CMakeLists.txt
+++ b/Tests/FindPackageTest/CMakeLists.txt
@@ -45,12 +45,18 @@ endif()
 
 find_package(SomePackage)
 if(NOT SomePackage_FOUND)
-  message(SEND_ERROR "SomePackage with FOUND_VAR SomePackage_FOUND not found !")
+  message(SEND_ERROR "SomePackage not found !")
+endif()
+if(NOT SOMEPACKAGE_FOUND)
+  message(SEND_ERROR "SomePackage compatibility name SOMEPACKAGE_FOUND not set!")
 endif()
 
 find_package(UpperCasePackage)
+if(NOT UpperCasePackage_FOUND)
+  message(SEND_ERROR "UpperCasePackage not found!")
+endif()
 if(NOT UPPERCASEPACKAGE_FOUND)
-  message(SEND_ERROR "UpperCasePackage with FOUND_VAR UPPERCASEPACKAGE_FOUND not found !")
+  message(SEND_ERROR "SomePackage compatibility name SOMEPACKAGE_FOUND not set!")
 endif()
 
 #-----------------------------------------------------------------------------
diff --git a/Tests/FindPackageTest/FindSomePackage.cmake b/Tests/FindPackageTest/FindSomePackage.cmake
index 7283d24..746c087 100644
--- a/Tests/FindPackageTest/FindSomePackage.cmake
+++ b/Tests/FindPackageTest/FindSomePackage.cmake
@@ -2,5 +2,4 @@ set(SOP_FOO TRUE)
 
 include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
 
-find_package_handle_standard_args(SomePackage REQUIRED_VARS SOP_FOO
-                                              FOUND_VAR SomePackage_FOUND )
+find_package_handle_standard_args(SomePackage REQUIRED_VARS SOP_FOO)
diff --git a/Tests/FindPackageTest/FindUpperCasePackage.cmake b/Tests/FindPackageTest/FindUpperCasePackage.cmake
index 425d417..5e349da 100644
--- a/Tests/FindPackageTest/FindUpperCasePackage.cmake
+++ b/Tests/FindPackageTest/FindUpperCasePackage.cmake
@@ -2,5 +2,4 @@ set(UCP_FOO TRUE)
 
 include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
 
-find_package_handle_standard_args(UpperCasePackage REQUIRED_VARS UCP_FOO
-                                                   FOUND_VAR UPPERCASEPACKAGE_FOUND )
+find_package_handle_standard_args(UpperCasePackage REQUIRED_VARS UCP_FOO)

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

Summary of changes:
 Help/release/dev/FPHSA-ExactCase-name.rst        |   10 +
 Modules/FindPackageHandleStandardArgs.cmake      |  263 +++++++++++-----------
 Tests/FindPackageTest/CMakeLists.txt             |   10 +-
 Tests/FindPackageTest/FindSomePackage.cmake      |    3 +-
 Tests/FindPackageTest/FindUpperCasePackage.cmake |    3 +-
 5 files changed, 157 insertions(+), 132 deletions(-)
 create mode 100644 Help/release/dev/FPHSA-ExactCase-name.rst


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list