[Cmake-commits] CMake branch, master, updated. v3.12.2-568-g11de149

Kitware Robot kwrobot at kitware.com
Mon Sep 10 08:05:07 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  11de1492d3d96f4527990aee212cd94c944c6f64 (commit)
       via  0aab59809caea3cc69a4d24c95a38ea9657943c3 (commit)
       via  62b56b5ec961a6c44cdae598fac98fbde11a0cd3 (commit)
       via  d6853ef405f1ac291d8304b9dbc30afb33831b01 (commit)
       via  68d015fc94af6e39212b051336d7dc7f5c18d1d2 (commit)
       via  0239b586bdca2173f8b7309bce7771f59ac99568 (commit)
       via  46855d000fcd624d2e1ea3ce79d0e8c6d0ba614c (commit)
       via  192e552099fcfbb30009db9d4284a04bb779231a (commit)
      from  1504c6db9067f30e293430c61641cfd6c2c515a6 (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=11de1492d3d96f4527990aee212cd94c944c6f64
commit 11de1492d3d96f4527990aee212cd94c944c6f64
Merge: 0aab598 192e552
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Sep 10 12:01:06 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Sep 10 08:01:21 2018 -0400

    Merge topic 'FindOpenSceneGraph-debug'
    
    192e552099 FindOpenSceneGraph: Fix find in Debug
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2341


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0aab59809caea3cc69a4d24c95a38ea9657943c3
commit 0aab59809caea3cc69a4d24c95a38ea9657943c3
Merge: 62b56b5 46855d0
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Sep 10 12:00:36 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Sep 10 08:00:41 2018 -0400

    Merge topic 'gicv-stdstring'
    
    46855d000f cmCacheManager::GetInitializedCacheValue(): Return as const std::string*
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2357


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=62b56b5ec961a6c44cdae598fac98fbde11a0cd3
commit 62b56b5ec961a6c44cdae598fac98fbde11a0cd3
Merge: d6853ef 68d015f
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Sep 10 11:59:33 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Sep 10 07:59:42 2018 -0400

    Merge topic 'FindSubversion-wc-info-error'
    
    68d015fc94 FindSubversion: Add Subversion_WC_INFO option to suppress failures
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2292


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d6853ef405f1ac291d8304b9dbc30afb33831b01
commit d6853ef405f1ac291d8304b9dbc30afb33831b01
Merge: 1504c6d 0239b58
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Sep 10 11:58:04 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Sep 10 07:58:10 2018 -0400

    Merge topic 'extra-generator-split-arg1'
    
    0239b586bd Extra Generator: Fix handling of CMAKE_<LANG>_COMPILER_ARG1
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2352


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=68d015fc94af6e39212b051336d7dc7f5c18d1d2
commit 68d015fc94af6e39212b051336d7dc7f5c18d1d2
Author:     Jason Heeris <jason.heeris at gmail.com>
AuthorDate: Thu Aug 16 10:57:35 2018 +1000
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Sep 7 16:17:28 2018 -0400

    FindSubversion: Add Subversion_WC_INFO option to suppress failures
    
    Subversion fails when the directory is not actually under its control.
    Allow projects to tolerate this case optionally.
    
    Fixes: #18264

diff --git a/Help/release/dev/FindSubversion-wc-info-error.rst b/Help/release/dev/FindSubversion-wc-info-error.rst
new file mode 100644
index 0000000..eaf6bfe
--- /dev/null
+++ b/Help/release/dev/FindSubversion-wc-info-error.rst
@@ -0,0 +1,6 @@
+FindSubversion-wc-info-error
+----------------------------
+
+* The :module:`FindSubversion` module ``Subversion_WC_INFO`` command
+  gained an ``IGNORE_SVN_FAILURE`` option to suppress failures,
+  e.g. when the source tree is not under Subversion control.
diff --git a/Modules/FindSubversion.cmake b/Modules/FindSubversion.cmake
index 537d3b2..e18ae88 100644
--- a/Modules/FindSubversion.cmake
+++ b/Modules/FindSubversion.cmake
@@ -19,17 +19,21 @@
 #
 #
 # The minimum required version of Subversion can be specified using the
-# standard syntax, e.g.  find_package(Subversion 1.4)
+# standard syntax, e.g. ``find_package(Subversion 1.4)``.
 #
 # If the command line client executable is found two macros are defined:
 #
 # ::
 #
-#   Subversion_WC_INFO(<dir> <var-prefix>)
+#   Subversion_WC_INFO(<dir> <var-prefix> [IGNORE_SVN_FAILURE])
 #   Subversion_WC_LOG(<dir> <var-prefix>)
 #
-# Subversion_WC_INFO extracts information of a subversion working copy
-# at a given location.  This macro defines the following variables:
+# ``Subversion_WC_INFO`` extracts information of a subversion working copy at a
+# given location.  This macro defines the following variables if running
+# Subversion's ``info`` command on ``<dir>`` succeeds; otherwise a
+# ``SEND_ERROR`` message is generated. The error can be ignored by providing the
+# ``IGNORE_SVN_FAILURE`` option, which causes these variables to remain
+# undefined.
 #
 # ::
 #
@@ -41,9 +45,8 @@
 #   <var-prefix>_WC_LAST_CHANGED_REV - revision of last commit
 #   <var-prefix>_WC_INFO - output of command `svn info <dir>'
 #
-# Subversion_WC_LOG retrieves the log message of the base revision of a
-# subversion working copy at a given location.  This macro defines the
-# variable:
+# ``Subversion_WC_LOG`` retrieves the log message of the base revision of a
+# subversion working copy at a given location.  This macro defines the variable:
 #
 # ::
 #
@@ -84,6 +87,14 @@ if(Subversion_SVN_EXECUTABLE)
     "\\2" Subversion_VERSION_SVN "${Subversion_VERSION_SVN}")
 
   macro(Subversion_WC_INFO dir prefix)
+
+    cmake_parse_arguments(
+      "Subversion_WC_INFO"
+      "IGNORE_SVN_FAILURE"
+      "" ""
+      ${ARGN}
+    )
+
     # the subversion commands should be executed with the C locale, otherwise
     # the message (which are parsed) may be translated, Alex
     set(_Subversion_SAVED_LC_ALL "$ENV{LC_ALL}")
@@ -95,10 +106,7 @@ if(Subversion_SVN_EXECUTABLE)
       RESULT_VARIABLE Subversion_svn_info_result
       OUTPUT_STRIP_TRAILING_WHITESPACE)
 
-    if(NOT ${Subversion_svn_info_result} EQUAL 0)
-      message(SEND_ERROR "Command \"${Subversion_SVN_EXECUTABLE} info ${dir}\" failed with output:\n${Subversion_svn_info_error}")
-    else()
-
+    if(${Subversion_svn_info_result} EQUAL 0)
       string(REGEX REPLACE "^(.*\n)?URL: ([^\n]+).*"
         "\\2" ${prefix}_WC_URL "${${prefix}_WC_INFO}")
       string(REGEX REPLACE "^(.*\n)?Repository Root: ([^\n]+).*"
@@ -111,7 +119,8 @@ if(Subversion_SVN_EXECUTABLE)
         "\\2" ${prefix}_WC_LAST_CHANGED_REV "${${prefix}_WC_INFO}")
       string(REGEX REPLACE "^(.*\n)?Last Changed Date: ([^\n]+).*"
         "\\2" ${prefix}_WC_LAST_CHANGED_DATE "${${prefix}_WC_INFO}")
-
+    elseif(NOT Subversion_WC_INFO_IGNORE_SVN_FAILURE)
+      message(SEND_ERROR "Command \"${Subversion_SVN_EXECUTABLE} info ${dir}\" failed with output:\n${Subversion_svn_info_error}")
     endif()
 
     # restore the previous LC_ALL

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0239b586bdca2173f8b7309bce7771f59ac99568
commit 0239b586bdca2173f8b7309bce7771f59ac99568
Author:     Adam Oleksy <extern.adam.oleksy at elektrobit.com>
AuthorDate: Wed Sep 5 14:55:08 2018 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Sep 7 16:11:11 2018 -0400

    Extra Generator: Fix handling of CMAKE_<LANG>_COMPILER_ARG1
    
    The "arg1" value is a command-line string so we must parse it to get
    separate arguments for `execute_process`.

diff --git a/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake b/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake
index 55e0373..11f4a29 100644
--- a/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake
+++ b/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake
@@ -27,6 +27,7 @@ macro(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang _resultIncludeDirs _resultDefines
     set(_compilerExecutable "${CMAKE_C_COMPILER}")
     set(_arg1 "${CMAKE_C_COMPILER_ARG1}")
   endif ()
+  separate_arguments(_arg1 NATIVE_COMMAND "${_arg1}")
   execute_process(COMMAND ${_compilerExecutable} ${_arg1} ${_stdver} ${_stdlib} -v -E -x ${_lang} -dD dummy
                   WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/CMakeFiles
                   ERROR_VARIABLE _gccOutput

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=46855d000fcd624d2e1ea3ce79d0e8c6d0ba614c
commit 46855d000fcd624d2e1ea3ce79d0e8c6d0ba614c
Author:     Vitaly Stakhovsky <vvs31415 at gitlab.org>
AuthorDate: Thu Sep 6 12:49:57 2018 -0400
Commit:     Vitaly Stakhovsky <vvs31415 at gitlab.org>
CommitDate: Thu Sep 6 12:49:57 2018 -0400

    cmCacheManager::GetInitializedCacheValue(): Return as const std::string*
    
    Expose std::string type used internally instead of const char*

diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx
index d2d419f..b391dc4 100644
--- a/Source/cmCacheManager.cxx
+++ b/Source/cmCacheManager.cxx
@@ -127,15 +127,15 @@ bool cmCacheManager::LoadCache(const std::string& path, bool internal,
   }
   this->CacheMajorVersion = 0;
   this->CacheMinorVersion = 0;
-  if (const char* cmajor =
+  if (const std::string* cmajor =
         this->GetInitializedCacheValue("CMAKE_CACHE_MAJOR_VERSION")) {
     unsigned int v = 0;
-    if (sscanf(cmajor, "%u", &v) == 1) {
+    if (sscanf(cmajor->c_str(), "%u", &v) == 1) {
       this->CacheMajorVersion = v;
     }
-    if (const char* cminor =
+    if (const std::string* cminor =
           this->GetInitializedCacheValue("CMAKE_CACHE_MINOR_VERSION")) {
-      if (sscanf(cminor, "%u", &v) == 1) {
+      if (sscanf(cminor->c_str(), "%u", &v) == 1) {
         this->CacheMinorVersion = v;
       }
     }
@@ -153,18 +153,20 @@ bool cmCacheManager::LoadCache(const std::string& path, bool internal,
   }
   // check to make sure the cache directory has not
   // been moved
-  const char* oldDir = this->GetInitializedCacheValue("CMAKE_CACHEFILE_DIR");
+  const std::string* oldDir =
+    this->GetInitializedCacheValue("CMAKE_CACHEFILE_DIR");
   if (internal && oldDir) {
     std::string currentcwd = path;
-    std::string oldcwd = oldDir;
+    std::string oldcwd = *oldDir;
     cmSystemTools::ConvertToUnixSlashes(currentcwd);
     currentcwd += "/CMakeCache.txt";
     oldcwd += "/CMakeCache.txt";
     if (!cmSystemTools::SameFile(oldcwd, currentcwd)) {
+      const std::string* dir =
+        this->GetInitializedCacheValue("CMAKE_CACHEFILE_DIR");
       std::ostringstream message;
       message << "The current CMakeCache.txt directory " << currentcwd
-              << " is different than the directory "
-              << this->GetInitializedCacheValue("CMAKE_CACHEFILE_DIR")
+              << " is different than the directory " << (dir ? *dir : "")
               << " where CMakeCache.txt was created. This may result "
                  "in binaries being created in the wrong place. If you "
                  "are not sure, reedit the CMakeCache.txt";
@@ -512,12 +514,12 @@ cmCacheManager::CacheIterator cmCacheManager::GetCacheIterator(const char* key)
   return CacheIterator(*this, key);
 }
 
-const char* cmCacheManager::GetInitializedCacheValue(
+const std::string* cmCacheManager::GetInitializedCacheValue(
   const std::string& key) const
 {
   CacheEntryMap::const_iterator i = this->Cache.find(key);
   if (i != this->Cache.end() && i->second.Initialized) {
-    return i->second.Value.c_str();
+    return &i->second.Value;
   }
   return nullptr;
 }
diff --git a/Source/cmCacheManager.h b/Source/cmCacheManager.h
index 73923d1..a269271 100644
--- a/Source/cmCacheManager.h
+++ b/Source/cmCacheManager.h
@@ -126,7 +126,7 @@ public:
   int GetSize() { return static_cast<int>(this->Cache.size()); }
 
   ///! Get a value from the cache given a key
-  const char* GetInitializedCacheValue(const std::string& key) const;
+  const std::string* GetInitializedCacheValue(const std::string& key) const;
 
   const char* GetCacheEntryValue(const std::string& key)
   {
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index 5651594..6c27a7d 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -142,7 +142,8 @@ const char* cmState::GetCacheEntryValue(std::string const& key) const
 
 const char* cmState::GetInitializedCacheValue(std::string const& key) const
 {
-  return this->CacheManager->GetInitializedCacheValue(key);
+  const std::string* p = this->CacheManager->GetInitializedCacheValue(key);
+  return p ? p->c_str() : nullptr;
 }
 
 cmStateEnums::CacheEntryType cmState::GetCacheEntryType(

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=192e552099fcfbb30009db9d4284a04bb779231a
commit 192e552099fcfbb30009db9d4284a04bb779231a
Author:     Cyril Boucher <cyril.boucher at sensefly.com>
AuthorDate: Wed Sep 5 16:15:37 2018 +0200
Commit:     Cyril Boucher <cyril.boucher at sensefly.com>
CommitDate: Thu Sep 6 09:32:56 2018 +0200

    FindOpenSceneGraph: Fix find in Debug
    
    As of now, it is not possible to find OpenSceneGraph in Debug because the only
    variable find_package_handle_standard_args is checking is ${module}_LIBRARY
    while the debug library is in ${module}_LIBRARY_DEBUG. The refactoring gets rid
    of the old behaviour to replace with a call to select_library_configurations
    which will populated ${module}_LIBRARY accordingly.
    
    [Modules/Findosg_functions.cmake Modules/FindOpenThreads.cmake]
    - Include SelectLibraryConfigurations module
    - Modify the name of the variable that will be populated by the first
      find_library to ${MODULE}_LIBRARY_RELEASE so that SelectLibraryConfigurations
    can act on it
    - Add call to select_library_configurations after attempting to find libraries
      in debug and release

diff --git a/Modules/FindOpenThreads.cmake b/Modules/FindOpenThreads.cmake
index a197e4d..91545e0 100644
--- a/Modules/FindOpenThreads.cmake
+++ b/Modules/FindOpenThreads.cmake
@@ -47,6 +47,8 @@
 # standard install paths.
 # Explicit -DVAR=value arguments should still be able to override everything.
 
+include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
+
 find_path(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread
     HINTS
         ENV OPENTHREADS_INCLUDE_DIR
@@ -62,7 +64,7 @@ find_path(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread
 )
 
 
-find_library(OPENTHREADS_LIBRARY
+find_library(OPENTHREADS_LIBRARY_RELEASE
     NAMES OpenThreads OpenThreadsWin32
     HINTS
         ENV OPENTHREADS_LIBRARY_DIR
@@ -93,13 +95,7 @@ find_library(OPENTHREADS_LIBRARY_DEBUG
     PATH_SUFFIXES lib
 )
 
-if(OPENTHREADS_LIBRARY_DEBUG)
-    set(OPENTHREADS_LIBRARIES
-        optimized ${OPENTHREADS_LIBRARY}
-        debug ${OPENTHREADS_LIBRARY_DEBUG})
-else()
-    set(OPENTHREADS_LIBRARIES ${OPENTHREADS_LIBRARY})
-endif()
+select_library_configurations(OPENTHREADS)
 
 include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenThreads DEFAULT_MSG
diff --git a/Modules/Findosg_functions.cmake b/Modules/Findosg_functions.cmake
index 60de726..adaeb6b 100644
--- a/Modules/Findosg_functions.cmake
+++ b/Modules/Findosg_functions.cmake
@@ -13,6 +13,8 @@
 # libraries and nodekits.  Please see FindOpenSceneGraph.cmake for full
 # documentation.
 
+include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
+
 #
 # OSG_FIND_PATH
 #
@@ -39,7 +41,7 @@ endfunction()
 function(OSG_FIND_LIBRARY module library)
    string(TOUPPER ${module} module_uc)
 
-   find_library(${module_uc}_LIBRARY
+   find_library(${module_uc}_LIBRARY_RELEASE
        NAMES ${library}
        HINTS
             ENV ${module_uc}_DIR
@@ -63,18 +65,12 @@ function(OSG_FIND_LIBRARY module library)
        PATH_SUFFIXES lib
     )
 
-   if(NOT ${module_uc}_LIBRARY_DEBUG)
-      # They don't have a debug library
-      set(${module_uc}_LIBRARY_DEBUG ${${module_uc}_LIBRARY} PARENT_SCOPE)
-      set(${module_uc}_LIBRARIES ${${module_uc}_LIBRARY} PARENT_SCOPE)
-   else()
-      # They really have a FOO_LIBRARY_DEBUG
-      set(${module_uc}_LIBRARIES
-          optimized ${${module_uc}_LIBRARY}
-          debug ${${module_uc}_LIBRARY_DEBUG}
-          PARENT_SCOPE
-      )
-   endif()
+   select_library_configurations(${module_uc})
+
+   # the variables set by select_library_configurations go out of scope
+   # here, so we need to set them again
+   set(${module_uc}_LIBRARY ${${module_uc}_LIBRARY} PARENT_SCOPE)
+   set(${module_uc}_LIBRARIES ${${module_uc}_LIBRARIES} PARENT_SCOPE)
 endfunction()
 
 #

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

Summary of changes:
 Help/release/dev/FindSubversion-wc-info-error.rst  |  6 ++++
 ...atorDetermineCompilerMacrosAndIncludeDirs.cmake |  1 +
 Modules/FindOpenThreads.cmake                      | 12 +++-----
 Modules/FindSubversion.cmake                       | 33 ++++++++++++++--------
 Modules/Findosg_functions.cmake                    | 22 ++++++---------
 Source/cmCacheManager.cxx                          | 22 ++++++++-------
 Source/cmCacheManager.h                            |  2 +-
 Source/cmState.cxx                                 |  3 +-
 8 files changed, 56 insertions(+), 45 deletions(-)
 create mode 100644 Help/release/dev/FindSubversion-wc-info-error.rst


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list