[Cmake-commits] CMake branch, master, updated. v3.12.2-696-g3523990

Kitware Robot kwrobot at kitware.com
Thu Sep 20 09:45:06 EDT 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  3523990f7b96b0f25836cf319a7c8112c55e5acd (commit)
       via  366df05ac028772097ac4d1aed2752d8a821b554 (commit)
       via  22db0d5c6e45d3ce247c2ebe5e5c54810363486f (commit)
       via  99648081085d8ec48a7846c918bee39a2bdde908 (commit)
       via  cc6e2b95d92d233c755c4649ba2d6914255a1e04 (commit)
       via  b69159324a386b48ff992725827029a432f8a549 (commit)
       via  eedd91ab085d551d7953f8bb6fe01fd5540af004 (commit)
       via  fd28ea35ca5f62e52d030288bf60ca6fe769cb96 (commit)
       via  3925407e76856c6e6bc6090fdee09a1008462840 (commit)
       via  bab868be135b721a5867275f8ffce38cb7b28d06 (commit)
       via  bfd93b73a03a6b2c1e8bb298f7085f90c30337c1 (commit)
       via  60e6e5db61d6f27814bb68dee1f497848e147ffb (commit)
       via  8085799ce3a311e3f0f3c2f2119ae0dcb8b2e0a3 (commit)
      from  ece1859e1e123adb2386df1c7d1ce53194f5a73f (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=3523990f7b96b0f25836cf319a7c8112c55e5acd
commit 3523990f7b96b0f25836cf319a7c8112c55e5acd
Merge: 366df05 b691593
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Sep 20 13:36:25 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu Sep 20 09:38:04 2018 -0400

    Merge topic 'bundleutilities-policy'
    
    b69159324a Help: Add release notes for new BundleUtilities policy
    eedd91ab08 BundleUtilities: Disallow inclusion at configure time
    fd28ea35ca Help: Add note for BundleUtilities usage
    3925407e76 Help: Convert BundleUtilities help to block-style comment
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2379


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=366df05ac028772097ac4d1aed2752d8a821b554
commit 366df05ac028772097ac4d1aed2752d8a821b554
Merge: 22db0d5 bab868b
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Sep 20 13:36:07 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu Sep 20 09:37:24 2018 -0400

    Merge topic 'rel-win-nightly'
    
    bab868be13 Utilities/Release: Skip spurious ExternalData test for nightly binary
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2404


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=22db0d5c6e45d3ce247c2ebe5e5c54810363486f
commit 22db0d5c6e45d3ce247c2ebe5e5c54810363486f
Merge: 9964808 bfd93b7
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Sep 20 13:35:45 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu Sep 20 09:36:31 2018 -0400

    Merge topic 'FindCUDA-filter-compute-capabilities'
    
    bfd93b73a0 FindCUDA: Filter unrelated content in compute capabilities output
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2400


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=99648081085d8ec48a7846c918bee39a2bdde908
commit 99648081085d8ec48a7846c918bee39a2bdde908
Merge: cc6e2b9 8085799
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Sep 20 13:35:39 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu Sep 20 09:35:45 2018 -0400

    Merge topic 'FindCUDA-ccbin-env'
    
    8085799ce3 FindCUDA: Add option to set CUDA_HOST_COMPILER via environment
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2391


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cc6e2b95d92d233c755c4649ba2d6914255a1e04
commit cc6e2b95d92d233c755c4649ba2d6914255a1e04
Merge: ece1859 60e6e5d
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Sep 20 09:34:50 2018 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Sep 20 09:34:50 2018 -0400

    Merge branch 'release-3.12'


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b69159324a386b48ff992725827029a432f8a549
commit b69159324a386b48ff992725827029a432f8a549
Author:     Kyle Edwards <kyle.edwards at kitware.com>
AuthorDate: Wed Sep 19 11:23:16 2018 -0400
Commit:     Kyle Edwards <kyle.edwards at kitware.com>
CommitDate: Wed Sep 19 11:23:16 2018 -0400

    Help: Add release notes for new BundleUtilities policy

diff --git a/Help/release/dev/bundleutilities-policy.rst b/Help/release/dev/bundleutilities-policy.rst
new file mode 100644
index 0000000..e293f92
--- /dev/null
+++ b/Help/release/dev/bundleutilities-policy.rst
@@ -0,0 +1,5 @@
+bundleutilities-policy
+----------------------
+
+* The :module:`BundleUtilities` module may no longer be included at configure
+  time. This was always a bug anyway. See policy :policy:`CMP0080`.

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eedd91ab085d551d7953f8bb6fe01fd5540af004
commit eedd91ab085d551d7953f8bb6fe01fd5540af004
Author:     Kyle Edwards <kyle.edwards at kitware.com>
AuthorDate: Wed Sep 12 13:33:04 2018 -0400
Commit:     Kyle Edwards <kyle.edwards at kitware.com>
CommitDate: Wed Sep 19 11:23:08 2018 -0400

    BundleUtilities: Disallow inclusion at configure time
    
    This commit adds a new CMake policy, CMP0080, which prohibits the
    inclusion of BundleUtilities at configure time. The old behavior is
    to allow the inclusion.

diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst
index 8ecca4d..904ebee 100644
--- a/Help/manual/cmake-policies.7.rst
+++ b/Help/manual/cmake-policies.7.rst
@@ -57,6 +57,7 @@ Policies Introduced by CMake 3.13
 .. toctree::
    :maxdepth: 1
 
+   CMP0080: BundleUtilities cannot be included at configure time. </policy/CMP0080>
    CMP0079: target_link_libraries allows use with targets in other directories. </policy/CMP0079>
    CMP0078: UseSWIG generates standard target names. </policy/CMP0078>
    CMP0077: option() honors normal variables. </policy/CMP0077>
diff --git a/Help/policy/CMP0080.rst b/Help/policy/CMP0080.rst
new file mode 100644
index 0000000..5ce9591
--- /dev/null
+++ b/Help/policy/CMP0080.rst
@@ -0,0 +1,25 @@
+CMP0080
+-------
+
+:module:`BundleUtilities` cannot be included at configure time.
+
+The macros provided by :module:`BundleUtilities` are intended to be invoked
+at install time rather than at configure time, because they depend on the
+listed targets already existing at the time they are invoked. If they are
+invoked at configure time, the targets haven't been built yet, and the
+commands will fail.
+
+This policy restricts the inclusion of :module:`BundleUtilities` to
+``cmake -P`` style scripts and install rules. Specifically, it looks for the
+presence of :variable:`CMAKE_GENERATOR` and throws a fatal error if it exists.
+
+The ``OLD`` behavior of this policy is to allow :module:`BundleUtilities` to
+be included at configure time. The ``NEW`` behavior of this policy is to
+disallow such inclusion.
+
+This policy was introduced in CMake version 3.13.  CMake version
+|release| warns when the policy is not set and uses ``OLD`` behavior.
+Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW``
+explicitly.
+
+.. include:: DEPRECATED.txt
diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake
index 191149c..31db25a 100644
--- a/Modules/BundleUtilities.cmake
+++ b/Modules/BundleUtilities.cmake
@@ -224,6 +224,20 @@ that are already also in the bundle...  Anything that points to an
 external file causes this function to fail the verification.
 #]=======================================================================]
 
+# Do not include this module at configure time!
+if(DEFINED CMAKE_GENERATOR)
+  cmake_policy(GET CMP0080 _BundleUtilities_CMP0080)
+  if(_BundleUtilities_CMP0080 STREQUAL "NEW")
+    message(FATAL_ERROR "BundleUtilities cannot be included at configure time!")
+  elseif(NOT _BundleUtilities_CMP0080 STREQUAL "OLD")
+    message(AUTHOR_WARNING
+      "Policy CMP0080 is not set: BundleUtilities prefers not to be included at configure time. "
+      "Run \"cmake --help-policy CMP0080\" for policy details. "
+      "Use the cmake_policy command to set the policy and suppress this warning."
+      )
+  endif()
+endif()
+
 # The functions defined in this file depend on the get_prerequisites function
 # (and possibly others) found in:
 #
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h
index 4ffe803..f99cc0f 100644
--- a/Source/cmPolicies.h
+++ b/Source/cmPolicies.h
@@ -234,7 +234,10 @@ class cmMakefile;
   SELECT(                                                                     \
     POLICY, CMP0079,                                                          \
     "target_link_libraries allows use with targets in other directories.", 3, \
-    13, 0, cmPolicies::WARN)
+    13, 0, cmPolicies::WARN)                                                  \
+  SELECT(POLICY, CMP0080,                                                     \
+         "BundleUtilities cannot be included at configure time", 3, 13, 0,    \
+         cmPolicies::WARN)
 
 #define CM_SELECT_ID(F, A1, A2, A3, A4, A5, A6) F(A1)
 #define CM_FOR_EACH_POLICY_ID(POLICY)                                         \
diff --git a/Tests/RunCMake/BundleUtilities/CMP0080-COMMAND.cmake b/Tests/RunCMake/BundleUtilities/CMP0080-COMMAND.cmake
new file mode 100644
index 0000000..063a7f3
--- /dev/null
+++ b/Tests/RunCMake/BundleUtilities/CMP0080-COMMAND.cmake
@@ -0,0 +1,5 @@
+if(DEFINED CMP0080_VALUE)
+  cmake_policy(SET CMP0080 ${CMP0080_VALUE})
+endif()
+
+include(BundleUtilities)
diff --git a/Tests/RunCMake/BundleUtilities/CMP0080-NEW-result.txt b/Tests/RunCMake/BundleUtilities/CMP0080-NEW-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/BundleUtilities/CMP0080-NEW-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/BundleUtilities/CMP0080-NEW-stderr.txt b/Tests/RunCMake/BundleUtilities/CMP0080-NEW-stderr.txt
new file mode 100644
index 0000000..1454b0c
--- /dev/null
+++ b/Tests/RunCMake/BundleUtilities/CMP0080-NEW-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at .*/Modules/BundleUtilities\.cmake:[0-9]+ \(message\):
+  BundleUtilities cannot be included at configure time!
diff --git a/Tests/RunCMake/BundleUtilities/CMP0080-NEW.cmake b/Tests/RunCMake/BundleUtilities/CMP0080-NEW.cmake
new file mode 100644
index 0000000..558c16d
--- /dev/null
+++ b/Tests/RunCMake/BundleUtilities/CMP0080-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0080 NEW)
+include(BundleUtilities)
diff --git a/Tests/RunCMake/BundleUtilities/CMP0080-OLD.cmake b/Tests/RunCMake/BundleUtilities/CMP0080-OLD.cmake
new file mode 100644
index 0000000..a65d92f
--- /dev/null
+++ b/Tests/RunCMake/BundleUtilities/CMP0080-OLD.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0080 OLD)
+include(BundleUtilities)
diff --git a/Tests/RunCMake/BundleUtilities/CMP0080-WARN-stderr.txt b/Tests/RunCMake/BundleUtilities/CMP0080-WARN-stderr.txt
new file mode 100644
index 0000000..a1a0e8f
--- /dev/null
+++ b/Tests/RunCMake/BundleUtilities/CMP0080-WARN-stderr.txt
@@ -0,0 +1,4 @@
+CMake Warning \(dev\) at .*/Modules/BundleUtilities\.cmake:[0-9]+ \(message\):
+  Policy CMP0080 is not set: BundleUtilities prefers not to be included at
+  configure time\.  Run "cmake --help-policy CMP0080" for policy details\.  Use
+  the cmake_policy command to set the policy and suppress this warning\.
diff --git a/Tests/RunCMake/BundleUtilities/CMP0080-WARN.cmake b/Tests/RunCMake/BundleUtilities/CMP0080-WARN.cmake
new file mode 100644
index 0000000..45f6f92
--- /dev/null
+++ b/Tests/RunCMake/BundleUtilities/CMP0080-WARN.cmake
@@ -0,0 +1 @@
+include(BundleUtilities)
diff --git a/Tests/RunCMake/BundleUtilities/CMakeLists.txt b/Tests/RunCMake/BundleUtilities/CMakeLists.txt
new file mode 100644
index 0000000..6dd8cdf
--- /dev/null
+++ b/Tests/RunCMake/BundleUtilities/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.4)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/BundleUtilities/RunCMakeTest.cmake b/Tests/RunCMake/BundleUtilities/RunCMakeTest.cmake
new file mode 100644
index 0000000..14aaff1
--- /dev/null
+++ b/Tests/RunCMake/BundleUtilities/RunCMakeTest.cmake
@@ -0,0 +1,11 @@
+cmake_minimum_required(VERSION 3.4)
+include(RunCMake)
+
+# TODO Migrate Tests/BundleUtilities here
+
+run_cmake(CMP0080-OLD)
+run_cmake(CMP0080-NEW)
+run_cmake(CMP0080-WARN)
+run_cmake_command(CMP0080-COMMAND-OLD ${CMAKE_COMMAND} -DCMP0080_VALUE:STRING=OLD -P ${RunCMake_SOURCE_DIR}/CMP0080-COMMAND.cmake)
+run_cmake_command(CMP0080-COMMAND-NEW ${CMAKE_COMMAND} -DCMP0080_VALUE:STRING=NEW -P ${RunCMake_SOURCE_DIR}/CMP0080-COMMAND.cmake)
+run_cmake_command(CMP0080-COMMAND-WARN ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/CMP0080-COMMAND.cmake)
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index c6c90d0..69cb5b7 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -251,6 +251,7 @@ add_RunCMake_test(separate_arguments)
 add_RunCMake_test(set_property)
 add_RunCMake_test(string)
 add_RunCMake_test(test_include_dirs)
+add_RunCMake_test(BundleUtilities)
 
 function(add_RunCMake_test_try_compile)
   if(CMAKE_VERSION VERSION_LESS 3.9.20170907 AND "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC")

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fd28ea35ca5f62e52d030288bf60ca6fe769cb96
commit fd28ea35ca5f62e52d030288bf60ca6fe769cb96
Author:     Kyle Edwards <kyle.edwards at kitware.com>
AuthorDate: Wed Sep 12 11:57:14 2018 -0400
Commit:     Kyle Edwards <kyle.edwards at kitware.com>
CommitDate: Wed Sep 19 11:23:08 2018 -0400

    Help: Add note for BundleUtilities usage
    
    The macros defined in BundleUtilities are intended to be used from
    an install() rule rather than at configure time. Add a note clarifying
    this.

diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake
index f271521..191149c 100644
--- a/Modules/BundleUtilities.cmake
+++ b/Modules/BundleUtilities.cmake
@@ -35,6 +35,10 @@ The following functions are provided by this module:
 Requires CMake 2.6 or greater because it uses function, break and
 PARENT_SCOPE.  Also depends on GetPrerequisites.cmake.
 
+DO NOT USE THESE FUNCTIONS AT CONFIGURE TIME (from ``CMakeLists.txt``)!
+Instead, invoke them from an :command:`install(CODE)` or
+:command:`install(SCRIPT)` rule.
+
 ::
 
   FIXUP_BUNDLE(<app> <libs> <dirs>)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3925407e76856c6e6bc6090fdee09a1008462840
commit 3925407e76856c6e6bc6090fdee09a1008462840
Author:     Kyle Edwards <kyle.edwards at kitware.com>
AuthorDate: Wed Sep 12 11:48:12 2018 -0400
Commit:     Kyle Edwards <kyle.edwards at kitware.com>
CommitDate: Wed Sep 19 11:23:08 2018 -0400

    Help: Convert BundleUtilities help to block-style comment

diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake
index 4727f03..f271521 100644
--- a/Modules/BundleUtilities.cmake
+++ b/Modules/BundleUtilities.cmake
@@ -1,223 +1,224 @@
 # Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
 # file Copyright.txt or https://cmake.org/licensing for details.
 
-#.rst:
-# BundleUtilities
-# ---------------
-#
-# Functions to help assemble a standalone bundle application.
-#
-# A collection of CMake utility functions useful for dealing with .app
-# bundles on the Mac and bundle-like directories on any OS.
-#
-# The following functions are provided by this module:
-#
-# ::
-#
-#    fixup_bundle
-#    copy_and_fixup_bundle
-#    verify_app
-#    get_bundle_main_executable
-#    get_dotapp_dir
-#    get_bundle_and_executable
-#    get_bundle_all_executables
-#    get_item_key
-#    get_item_rpaths
-#    clear_bundle_keys
-#    set_bundle_key_values
-#    get_bundle_keys
-#    copy_resolved_item_into_bundle
-#    copy_resolved_framework_into_bundle
-#    fixup_bundle_item
-#    verify_bundle_prerequisites
-#    verify_bundle_symlinks
-#
-# Requires CMake 2.6 or greater because it uses function, break and
-# PARENT_SCOPE.  Also depends on GetPrerequisites.cmake.
-#
-# ::
-#
-#   FIXUP_BUNDLE(<app> <libs> <dirs>)
-#
-# Fix up a bundle in-place and make it standalone, such that it can be
-# drag-n-drop copied to another machine and run on that machine as long
-# as all of the system libraries are compatible.
-#
-# If you pass plugins to fixup_bundle as the libs parameter, you should
-# install them or copy them into the bundle before calling fixup_bundle.
-# The "libs" parameter is a list of libraries that must be fixed up, but
-# that cannot be determined by otool output analysis.  (i.e., plugins)
-#
-# Gather all the keys for all the executables and libraries in a bundle,
-# and then, for each key, copy each prerequisite into the bundle.  Then
-# fix each one up according to its own list of prerequisites.
-#
-# Then clear all the keys and call verify_app on the final bundle to
-# ensure that it is truly standalone.
-#
-# As an optional parameter (IGNORE_ITEM) a list of file names can be passed,
-# which are then ignored (e.g. IGNORE_ITEM "vcredist_x86.exe;vcredist_x64.exe")
-#
-# ::
-#
-#   COPY_AND_FIXUP_BUNDLE(<src> <dst> <libs> <dirs>)
-#
-# Makes a copy of the bundle <src> at location <dst> and then fixes up
-# the new copied bundle in-place at <dst>...
-#
-# ::
-#
-#   VERIFY_APP(<app>)
-#
-# Verifies that an application <app> appears valid based on running
-# analysis tools on it.  Calls "message(FATAL_ERROR" if the application
-# is not verified.
-#
-# As an optional parameter (IGNORE_ITEM) a list of file names can be passed,
-# which are then ignored (e.g. IGNORE_ITEM "vcredist_x86.exe;vcredist_x64.exe")
-#
-# ::
-#
-#   GET_BUNDLE_MAIN_EXECUTABLE(<bundle> <result_var>)
-#
-# The result will be the full path name of the bundle's main executable
-# file or an "error:" prefixed string if it could not be determined.
-#
-# ::
-#
-#   GET_DOTAPP_DIR(<exe> <dotapp_dir_var>)
-#
-# Returns the nearest parent dir whose name ends with ".app" given the
-# full path to an executable.  If there is no such parent dir, then
-# simply return the dir containing the executable.
-#
-# The returned directory may or may not exist.
-#
-# ::
-#
-#   GET_BUNDLE_AND_EXECUTABLE(<app> <bundle_var> <executable_var> <valid_var>)
-#
-# Takes either a ".app" directory name or the name of an executable
-# nested inside a ".app" directory and returns the path to the ".app"
-# directory in <bundle_var> and the path to its main executable in
-# <executable_var>
-#
-# ::
-#
-#   GET_BUNDLE_ALL_EXECUTABLES(<bundle> <exes_var>)
-#
-# Scans the given bundle recursively for all executable files and
-# accumulates them into a variable.
-#
-# ::
-#
-#   GET_ITEM_KEY(<item> <key_var>)
-#
-# Given a file (item) name, generate a key that should be unique
-# considering the set of libraries that need copying or fixing up to
-# make a bundle standalone.  This is essentially the file name including
-# extension with "." replaced by "_"
-#
-# This key is used as a prefix for CMake variables so that we can
-# associate a set of variables with a given item based on its key.
-#
-# ::
-#
-#   CLEAR_BUNDLE_KEYS(<keys_var>)
-#
-# Loop over the list of keys, clearing all the variables associated with
-# each key.  After the loop, clear the list of keys itself.
-#
-# Caller of get_bundle_keys should call clear_bundle_keys when done with
-# list of keys.
-#
-# ::
-#
-#   SET_BUNDLE_KEY_VALUES(<keys_var> <context> <item> <exepath> <dirs>
-#                         <copyflag> [<rpaths>])
-#
-# Add a key to the list (if necessary) for the given item.  If added,
-# also set all the variables associated with that key.
-#
-# ::
-#
-#   GET_BUNDLE_KEYS(<app> <libs> <dirs> <keys_var>)
-#
-# Loop over all the executable and library files within the bundle (and
-# given as extra <libs>) and accumulate a list of keys representing
-# them.  Set values associated with each key such that we can loop over
-# all of them and copy prerequisite libs into the bundle and then do
-# appropriate install_name_tool fixups.
-#
-# As an optional parameter (IGNORE_ITEM) a list of file names can be passed,
-# which are then ignored (e.g. IGNORE_ITEM "vcredist_x86.exe;vcredist_x64.exe")
-#
-# ::
-#
-#   COPY_RESOLVED_ITEM_INTO_BUNDLE(<resolved_item> <resolved_embedded_item>)
-#
-# Copy a resolved item into the bundle if necessary.  Copy is not
-# necessary if the resolved_item is "the same as" the
-# resolved_embedded_item.
-#
-# ::
-#
-#   COPY_RESOLVED_FRAMEWORK_INTO_BUNDLE(<resolved_item> <resolved_embedded_item>)
-#
-# Copy a resolved framework into the bundle if necessary.  Copy is not
-# necessary if the resolved_item is "the same as" the
-# resolved_embedded_item.
-#
-# By default, BU_COPY_FULL_FRAMEWORK_CONTENTS is not set.  If you want
-# full frameworks embedded in your bundles, set
-# BU_COPY_FULL_FRAMEWORK_CONTENTS to ON before calling fixup_bundle.  By
-# default, COPY_RESOLVED_FRAMEWORK_INTO_BUNDLE copies the framework
-# dylib itself plus the framework Resources directory.
-#
-# ::
-#
-#   FIXUP_BUNDLE_ITEM(<resolved_embedded_item> <exepath> <dirs>)
-#
-# Get the direct/non-system prerequisites of the resolved embedded item.
-# For each prerequisite, change the way it is referenced to the value of
-# the _EMBEDDED_ITEM keyed variable for that prerequisite.  (Most likely
-# changing to an "@executable_path" style reference.)
-#
-# This function requires that the resolved_embedded_item be "inside" the
-# bundle already.  In other words, if you pass plugins to fixup_bundle
-# as the libs parameter, you should install them or copy them into the
-# bundle before calling fixup_bundle.  The "libs" parameter is a list of
-# libraries that must be fixed up, but that cannot be determined by
-# otool output analysis.  (i.e., plugins)
-#
-# Also, change the id of the item being fixed up to its own
-# _EMBEDDED_ITEM value.
-#
-# Accumulate changes in a local variable and make *one* call to
-# install_name_tool at the end of the function with all the changes at
-# once.
-#
-# If the BU_CHMOD_BUNDLE_ITEMS variable is set then bundle items will be
-# marked writable before install_name_tool tries to change them.
-#
-# ::
-#
-#   VERIFY_BUNDLE_PREREQUISITES(<bundle> <result_var> <info_var>)
-#
-# Verifies that the sum of all prerequisites of all files inside the
-# bundle are contained within the bundle or are "system" libraries,
-# presumed to exist everywhere.
-#
-# As an optional parameter (IGNORE_ITEM) a list of file names can be passed,
-# which are then ignored (e.g. IGNORE_ITEM "vcredist_x86.exe;vcredist_x64.exe")
-#
-# ::
-#
-#   VERIFY_BUNDLE_SYMLINKS(<bundle> <result_var> <info_var>)
-#
-# Verifies that any symlinks found in the bundle point to other files
-# that are already also in the bundle...  Anything that points to an
-# external file causes this function to fail the verification.
+#[=======================================================================[.rst:
+BundleUtilities
+---------------
+
+Functions to help assemble a standalone bundle application.
+
+A collection of CMake utility functions useful for dealing with .app
+bundles on the Mac and bundle-like directories on any OS.
+
+The following functions are provided by this module:
+
+::
+
+   fixup_bundle
+   copy_and_fixup_bundle
+   verify_app
+   get_bundle_main_executable
+   get_dotapp_dir
+   get_bundle_and_executable
+   get_bundle_all_executables
+   get_item_key
+   get_item_rpaths
+   clear_bundle_keys
+   set_bundle_key_values
+   get_bundle_keys
+   copy_resolved_item_into_bundle
+   copy_resolved_framework_into_bundle
+   fixup_bundle_item
+   verify_bundle_prerequisites
+   verify_bundle_symlinks
+
+Requires CMake 2.6 or greater because it uses function, break and
+PARENT_SCOPE.  Also depends on GetPrerequisites.cmake.
+
+::
+
+  FIXUP_BUNDLE(<app> <libs> <dirs>)
+
+Fix up a bundle in-place and make it standalone, such that it can be
+drag-n-drop copied to another machine and run on that machine as long
+as all of the system libraries are compatible.
+
+If you pass plugins to fixup_bundle as the libs parameter, you should
+install them or copy them into the bundle before calling fixup_bundle.
+The "libs" parameter is a list of libraries that must be fixed up, but
+that cannot be determined by otool output analysis.  (i.e., plugins)
+
+Gather all the keys for all the executables and libraries in a bundle,
+and then, for each key, copy each prerequisite into the bundle.  Then
+fix each one up according to its own list of prerequisites.
+
+Then clear all the keys and call verify_app on the final bundle to
+ensure that it is truly standalone.
+
+As an optional parameter (IGNORE_ITEM) a list of file names can be passed,
+which are then ignored (e.g. IGNORE_ITEM "vcredist_x86.exe;vcredist_x64.exe")
+
+::
+
+  COPY_AND_FIXUP_BUNDLE(<src> <dst> <libs> <dirs>)
+
+Makes a copy of the bundle <src> at location <dst> and then fixes up
+the new copied bundle in-place at <dst>...
+
+::
+
+  VERIFY_APP(<app>)
+
+Verifies that an application <app> appears valid based on running
+analysis tools on it.  Calls "message(FATAL_ERROR" if the application
+is not verified.
+
+As an optional parameter (IGNORE_ITEM) a list of file names can be passed,
+which are then ignored (e.g. IGNORE_ITEM "vcredist_x86.exe;vcredist_x64.exe")
+
+::
+
+  GET_BUNDLE_MAIN_EXECUTABLE(<bundle> <result_var>)
+
+The result will be the full path name of the bundle's main executable
+file or an "error:" prefixed string if it could not be determined.
+
+::
+
+  GET_DOTAPP_DIR(<exe> <dotapp_dir_var>)
+
+Returns the nearest parent dir whose name ends with ".app" given the
+full path to an executable.  If there is no such parent dir, then
+simply return the dir containing the executable.
+
+The returned directory may or may not exist.
+
+::
+
+  GET_BUNDLE_AND_EXECUTABLE(<app> <bundle_var> <executable_var> <valid_var>)
+
+Takes either a ".app" directory name or the name of an executable
+nested inside a ".app" directory and returns the path to the ".app"
+directory in <bundle_var> and the path to its main executable in
+<executable_var>
+
+::
+
+  GET_BUNDLE_ALL_EXECUTABLES(<bundle> <exes_var>)
+
+Scans the given bundle recursively for all executable files and
+accumulates them into a variable.
+
+::
+
+  GET_ITEM_KEY(<item> <key_var>)
+
+Given a file (item) name, generate a key that should be unique
+considering the set of libraries that need copying or fixing up to
+make a bundle standalone.  This is essentially the file name including
+extension with "." replaced by "_"
+
+This key is used as a prefix for CMake variables so that we can
+associate a set of variables with a given item based on its key.
+
+::
+
+  CLEAR_BUNDLE_KEYS(<keys_var>)
+
+Loop over the list of keys, clearing all the variables associated with
+each key.  After the loop, clear the list of keys itself.
+
+Caller of get_bundle_keys should call clear_bundle_keys when done with
+list of keys.
+
+::
+
+  SET_BUNDLE_KEY_VALUES(<keys_var> <context> <item> <exepath> <dirs>
+                        <copyflag> [<rpaths>])
+
+Add a key to the list (if necessary) for the given item.  If added,
+also set all the variables associated with that key.
+
+::
+
+  GET_BUNDLE_KEYS(<app> <libs> <dirs> <keys_var>)
+
+Loop over all the executable and library files within the bundle (and
+given as extra <libs>) and accumulate a list of keys representing
+them.  Set values associated with each key such that we can loop over
+all of them and copy prerequisite libs into the bundle and then do
+appropriate install_name_tool fixups.
+
+As an optional parameter (IGNORE_ITEM) a list of file names can be passed,
+which are then ignored (e.g. IGNORE_ITEM "vcredist_x86.exe;vcredist_x64.exe")
+
+::
+
+  COPY_RESOLVED_ITEM_INTO_BUNDLE(<resolved_item> <resolved_embedded_item>)
+
+Copy a resolved item into the bundle if necessary.  Copy is not
+necessary if the resolved_item is "the same as" the
+resolved_embedded_item.
+
+::
+
+  COPY_RESOLVED_FRAMEWORK_INTO_BUNDLE(<resolved_item> <resolved_embedded_item>)
+
+Copy a resolved framework into the bundle if necessary.  Copy is not
+necessary if the resolved_item is "the same as" the
+resolved_embedded_item.
+
+By default, BU_COPY_FULL_FRAMEWORK_CONTENTS is not set.  If you want
+full frameworks embedded in your bundles, set
+BU_COPY_FULL_FRAMEWORK_CONTENTS to ON before calling fixup_bundle.  By
+default, COPY_RESOLVED_FRAMEWORK_INTO_BUNDLE copies the framework
+dylib itself plus the framework Resources directory.
+
+::
+
+  FIXUP_BUNDLE_ITEM(<resolved_embedded_item> <exepath> <dirs>)
+
+Get the direct/non-system prerequisites of the resolved embedded item.
+For each prerequisite, change the way it is referenced to the value of
+the _EMBEDDED_ITEM keyed variable for that prerequisite.  (Most likely
+changing to an "@executable_path" style reference.)
+
+This function requires that the resolved_embedded_item be "inside" the
+bundle already.  In other words, if you pass plugins to fixup_bundle
+as the libs parameter, you should install them or copy them into the
+bundle before calling fixup_bundle.  The "libs" parameter is a list of
+libraries that must be fixed up, but that cannot be determined by
+otool output analysis.  (i.e., plugins)
+
+Also, change the id of the item being fixed up to its own
+_EMBEDDED_ITEM value.
+
+Accumulate changes in a local variable and make *one* call to
+install_name_tool at the end of the function with all the changes at
+once.
+
+If the BU_CHMOD_BUNDLE_ITEMS variable is set then bundle items will be
+marked writable before install_name_tool tries to change them.
+
+::
+
+  VERIFY_BUNDLE_PREREQUISITES(<bundle> <result_var> <info_var>)
+
+Verifies that the sum of all prerequisites of all files inside the
+bundle are contained within the bundle or are "system" libraries,
+presumed to exist everywhere.
+
+As an optional parameter (IGNORE_ITEM) a list of file names can be passed,
+which are then ignored (e.g. IGNORE_ITEM "vcredist_x86.exe;vcredist_x64.exe")
+
+::
+
+  VERIFY_BUNDLE_SYMLINKS(<bundle> <result_var> <info_var>)
+
+Verifies that any symlinks found in the bundle point to other files
+that are already also in the bundle...  Anything that points to an
+external file causes this function to fail the verification.
+#]=======================================================================]
 
 # The functions defined in this file depend on the get_prerequisites function
 # (and possibly others) found in:

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bab868be135b721a5867275f8ffce38cb7b28d06
commit bab868be135b721a5867275f8ffce38cb7b28d06
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Sep 19 08:34:40 2018 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Sep 19 10:59:21 2018 -0400

    Utilities/Release: Skip spurious ExternalData test for nightly binary
    
    This test fails spuriously too often and prevents the nightly binary
    from finishing.  Simply skip it for the nightly binary to allow it to
    complete more regularly.

diff --git a/Utilities/Release/win32_release.cmake b/Utilities/Release/win32_release.cmake
index f9e35a5..2e817d9 100644
--- a/Utilities/Release/win32_release.cmake
+++ b/Utilities/Release/win32_release.cmake
@@ -39,6 +39,6 @@ get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
 set(GIT_EXTRA "git config core.autocrlf true")
 if(CMAKE_CREATE_VERSION STREQUAL "nightly")
   # Some tests fail spuriously too often.
-  set(EXTRA_CTEST_ARGS "-E 'ConsoleBuf'")
+  set(EXTRA_CTEST_ARGS "-E 'ConsoleBuf|Module.ExternalData'")
 endif()
 include(${path}/release_cmake.cmake)
diff --git a/Utilities/Release/win64_release.cmake b/Utilities/Release/win64_release.cmake
index 02e4096..33af830 100644
--- a/Utilities/Release/win64_release.cmake
+++ b/Utilities/Release/win64_release.cmake
@@ -39,6 +39,6 @@ get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
 set(GIT_EXTRA "git config core.autocrlf true")
 if(CMAKE_CREATE_VERSION STREQUAL "nightly")
   # Some tests fail spuriously too often.
-  set(EXTRA_CTEST_ARGS "-E 'ConsoleBuf'")
+  set(EXTRA_CTEST_ARGS "-E 'ConsoleBuf|Module.ExternalData'")
 endif()
 include(${path}/release_cmake.cmake)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bfd93b73a03a6b2c1e8bb298f7085f90c30337c1
commit bfd93b73a03a6b2c1e8bb298f7085f90c30337c1
Author:     Soumith Chintala <soumith at gmail.com>
AuthorDate: Tue Sep 18 19:50:23 2018 -0700
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Sep 19 10:55:02 2018 -0400

    FindCUDA: Filter unrelated content in compute capabilities output
    
    Working around CUDA-level nvrm_gpu log statements to stdout on some
    embedded platforms (ex. Drive PX2).
    
    See-also: https://github.com/pytorch/pytorch/issues/11518#issue-359113249

diff --git a/Modules/FindCUDA/select_compute_arch.cmake b/Modules/FindCUDA/select_compute_arch.cmake
index cf4fc39..1baf051 100644
--- a/Modules/FindCUDA/select_compute_arch.cmake
+++ b/Modules/FindCUDA/select_compute_arch.cmake
@@ -109,6 +109,9 @@ function(CUDA_DETECT_INSTALLED_GPUS OUT_VARIABLE)
               RUN_OUTPUT_VARIABLE compute_capabilities)
     endif()
 
+    # Filter unrelated content out of the output.
+    string(REGEX MATCHALL "[0-9]+\\.[0-9]+" compute_capabilities "${compute_capabilities}")
+
     if(run_result EQUAL 0)
       string(REPLACE "2.1" "2.1(2.0)" compute_capabilities "${compute_capabilities}")
       set(CUDA_GPU_DETECT_OUTPUT ${compute_capabilities}

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8085799ce3a311e3f0f3c2f2119ae0dcb8b2e0a3
commit 8085799ce3a311e3f0f3c2f2119ae0dcb8b2e0a3
Author:     peterjc123 <peter_jiachen at 163.com>
AuthorDate: Sat Sep 15 05:14:38 2018 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Sep 18 11:41:47 2018 -0400

    FindCUDA: Add option to set CUDA_HOST_COMPILER via environment
    
    Re-use the `CUDAHOSTCXX` environment variable from the first-class
    CUDA language support to specify the host compiler for FindCUDA.

diff --git a/Help/envvar/CUDAHOSTCXX.rst b/Help/envvar/CUDAHOSTCXX.rst
index f0f94f6..bb786ca 100644
--- a/Help/envvar/CUDAHOSTCXX.rst
+++ b/Help/envvar/CUDAHOSTCXX.rst
@@ -7,3 +7,7 @@ determine ``CUDA`` host compiler, after which the value for ``CUDAHOSTCXX`` is
 stored in the cache as :variable:`CMAKE_CUDA_HOST_COMPILER`. For any
 configuration run (including the first), the environment variable will be
 ignored if the :variable:`CMAKE_CUDA_HOST_COMPILER` variable is defined.
+
+This environment variable is primarily meant for use with projects that
+enable ``CUDA`` as a first-class language.  The :module:`FindCUDA`
+module will also use it to initialize its ``CUDA_HOST_COMPILER`` setting.
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index 1650e55..686e2e7 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -105,6 +105,8 @@
 #      the host compiler is constructed with one or more visual studio macros
 #      such as $(VCInstallDir), that expands out to the path when
 #      the command is run from within VS.
+#      If the CUDAHOSTCXX environment variable is set it will
+#      be used as the default.
 #
 #   CUDA_NVCC_FLAGS
 #   CUDA_NVCC_FLAGS_<CONFIG>
@@ -527,7 +529,9 @@ option(CUDA_HOST_COMPILATION_CPP "Generated file extension" ON)
 # Extra user settable flags
 cmake_initialize_per_config_variable(CUDA_NVCC_FLAGS "Semi-colon delimit multiple arguments.")
 
-if(CMAKE_GENERATOR MATCHES "Visual Studio")
+if(DEFINED ENV{CUDAHOSTCXX})
+  set(CUDA_HOST_COMPILER "$ENV{CUDAHOSTCXX}" CACHE FILEPATH "Host side compiler used by NVCC")
+elseif(CMAKE_GENERATOR MATCHES "Visual Studio")
   set(_CUDA_MSVC_HOST_COMPILER "$(VCInstallDir)Tools/MSVC/$(VCToolsVersion)/bin/Host$(Platform)/$(PlatformTarget)")
   if(MSVC_VERSION LESS 1910)
    set(_CUDA_MSVC_HOST_COMPILER "$(VCInstallDir)bin")

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

Summary of changes:
 Help/envvar/CUDAHOSTCXX.rst                        |   4 +
 Help/manual/cmake-policies.7.rst                   |   1 +
 Help/policy/CMP0080.rst                            |  25 ++
 Help/release/dev/bundleutilities-policy.rst        |   5 +
 Modules/BundleUtilities.cmake                      | 453 +++++++++++----------
 Modules/FindCUDA.cmake                             |   6 +-
 Modules/FindCUDA/select_compute_arch.cmake         |   3 +
 Source/cmPolicies.h                                |   5 +-
 .../RunCMake/BundleUtilities/CMP0080-COMMAND.cmake |   5 +
 .../CMP0080-NEW-result.txt}                        |   0
 .../BundleUtilities/CMP0080-NEW-stderr.txt         |   2 +
 Tests/RunCMake/BundleUtilities/CMP0080-NEW.cmake   |   2 +
 Tests/RunCMake/BundleUtilities/CMP0080-OLD.cmake   |   2 +
 .../BundleUtilities/CMP0080-WARN-stderr.txt        |   4 +
 Tests/RunCMake/BundleUtilities/CMP0080-WARN.cmake  |   1 +
 .../{install => BundleUtilities}/CMakeLists.txt    |   0
 Tests/RunCMake/BundleUtilities/RunCMakeTest.cmake  |  11 +
 Tests/RunCMake/CMakeLists.txt                      |   1 +
 Utilities/Release/win32_release.cmake              |   2 +-
 Utilities/Release/win64_release.cmake              |   2 +-
 20 files changed, 313 insertions(+), 221 deletions(-)
 create mode 100644 Help/policy/CMP0080.rst
 create mode 100644 Help/release/dev/bundleutilities-policy.rst
 create mode 100644 Tests/RunCMake/BundleUtilities/CMP0080-COMMAND.cmake
 copy Tests/RunCMake/{while/MissingArgument-result.txt => BundleUtilities/CMP0080-NEW-result.txt} (100%)
 create mode 100644 Tests/RunCMake/BundleUtilities/CMP0080-NEW-stderr.txt
 create mode 100644 Tests/RunCMake/BundleUtilities/CMP0080-NEW.cmake
 create mode 100644 Tests/RunCMake/BundleUtilities/CMP0080-OLD.cmake
 create mode 100644 Tests/RunCMake/BundleUtilities/CMP0080-WARN-stderr.txt
 create mode 100644 Tests/RunCMake/BundleUtilities/CMP0080-WARN.cmake
 copy Tests/RunCMake/{install => BundleUtilities}/CMakeLists.txt (100%)
 create mode 100644 Tests/RunCMake/BundleUtilities/RunCMakeTest.cmake


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list