[Cmake-commits] CMake branch, master, updated. v3.9.1-501-ga2405b4

Kitware Robot kwrobot at kitware.com
Wed Aug 16 10:55:06 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, master has been updated
       via  a2405b43788787c5c34f9d2b7b005c0ef6c3bb24 (commit)
       via  d817bbb8dfda07e94850c73811b7a520cb65c6f0 (commit)
       via  75b3866a8ebfbb2823611ebc7e7febeea2bd91c1 (commit)
       via  6ffb0f9d052c00d0cc9aba275378977e3f41642c (commit)
       via  b034e22f3605583d3ff22b5ccfb6b59bfc8b1500 (commit)
       via  867b0611539de7204521205df59947d7abfc2ed4 (commit)
       via  472acc890f368773a92ba52d326f0a8770aae020 (commit)
       via  cbcf6458f45f1b714487b3d6e1713d6e40e448f0 (commit)
       via  91417e4ca39c216c9ca12a3418554ec7c6ba0950 (commit)
       via  f78228dfd56b66d401c2b99f7883a7cebb18ecf7 (commit)
       via  630235bd9e049a8da47c05b1b82790272e22c834 (commit)
       via  d4b8a6b9d654fafe5cbea9c7767e5e6a2e487bc3 (commit)
       via  fe45d13a0e7227419f1420d9511f6dcfb085b129 (commit)
       via  752ab27292b0ed801c1850eebb96b2d9651b839d (commit)
       via  1622848efced798022ac320aaa3e49a3433e0024 (commit)
       via  a428b87ccfa5fe186246f7faef42db11ba85fa74 (commit)
       via  62930253a3d3eb983f846a3cf20f36e34c71cb9e (commit)
       via  5868be86779b628e49226b3b4139f86e5a0ccb69 (commit)
       via  d8ecc2545798c77ec5bf22bb420a3343d4843ef6 (commit)
      from  1e77d0dbef67f835d4a736df21069a8d6b43f5b9 (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=a2405b43788787c5c34f9d2b7b005c0ef6c3bb24
commit a2405b43788787c5c34f9d2b7b005c0ef6c3bb24
Merge: d817bbb cbcf645
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Aug 16 14:51:46 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Wed Aug 16 10:51:48 2017 -0400

    Merge topic 'lint-fixes'
    
    cbcf6458 cmServerProtocol: Do not move into json::Value::append()
    91417e4c cmServerProtocol: pass cmBacktraceRange by value
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1143


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d817bbb8dfda07e94850c73811b7a520cb65c6f0
commit d817bbb8dfda07e94850c73811b7a520cb65c6f0
Merge: 75b3866 d8ecc25
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Aug 16 14:50:34 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Wed Aug 16 10:50:38 2017 -0400

    Merge topic 'string_prepend'
    
    d8ecc254 Add PREPEND sub-command to string command
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1129


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=75b3866a8ebfbb2823611ebc7e7febeea2bd91c1
commit 75b3866a8ebfbb2823611ebc7e7febeea2bd91c1
Merge: 6ffb0f9 5868be8
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Aug 16 14:50:15 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Wed Aug 16 10:50:22 2017 -0400

    Merge topic 'ice-3.7.0'
    
    5868be86 FindIce: Add support for Ice 3.7.0
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1137


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6ffb0f9d052c00d0cc9aba275378977e3f41642c
commit 6ffb0f9d052c00d0cc9aba275378977e3f41642c
Merge: b034e22 f78228d
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Aug 16 10:48:20 2017 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Aug 16 10:48:20 2017 -0400

    Merge branch 'release-3.9'


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b034e22f3605583d3ff22b5ccfb6b59bfc8b1500
commit b034e22f3605583d3ff22b5ccfb6b59bfc8b1500
Merge: 867b061 a428b87
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Aug 16 14:47:28 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Wed Aug 16 10:47:38 2017 -0400

    Merge topic 'FindCygwin-fix-regression'
    
    a428b87c Merge branch 'backport-FindCygwin-fix-regression' into FindCygwin-fix-regression
    62930253 FindCygwin: Fix regression when CYGWIN_INSTALL_PATH is already set
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1128


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=867b0611539de7204521205df59947d7abfc2ed4
commit 867b0611539de7204521205df59947d7abfc2ed4
Merge: 472acc8 630235b
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Aug 16 14:47:04 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Wed Aug 16 10:47:10 2017 -0400

    Merge topic 'debian_clang_binutils'
    
    630235bd Clang: Find version-suffixed LLVM/Clang binutils
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1127


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=472acc890f368773a92ba52d326f0a8770aae020
commit 472acc890f368773a92ba52d326f0a8770aae020
Merge: 1e77d0d fe45d13
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Aug 16 14:46:37 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Wed Aug 16 10:46:42 2017 -0400

    Merge topic 'cuda-device-link-ccbin'
    
    fe45d13a CUDA: Pass host compiler to nvcc while device linking
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Acked-by: Robert Maynard <robert.maynard at kitware.com>
    Merge-request: !1138


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cbcf6458f45f1b714487b3d6e1713d6e40e448f0
commit cbcf6458f45f1b714487b3d6e1713d6e40e448f0
Author:     Daniel Pfeifer <daniel at pfeifer-mail.de>
AuthorDate: Tue Aug 15 22:43:08 2017 +0200
Commit:     Daniel Pfeifer <daniel at pfeifer-mail.de>
CommitDate: Tue Aug 15 22:43:08 2017 +0200

    cmServerProtocol: Do not move into json::Value::append()
    
    CMake's copy of json-cpp is not aware of rvalues yet.  It is confusing
    to pass the result of std::move to a function that takes a const&
    because no move will actually happen.  This change may be reverted once
    CMake upgrades to a new version of json-cpp.

diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx
index 557bee0..baaf11a 100644
--- a/Source/cmServerProtocol.cxx
+++ b/Source/cmServerProtocol.cxx
@@ -747,7 +747,7 @@ static Json::Value DumpBacktrace(const cmListFileBacktrace& backtrace)
     if (!backtraceCopy.Top().Name.empty()) {
       entry[kNAME_KEY] = backtraceCopy.Top().Name;
     }
-    result.append(std::move(entry));
+    result.append(entry);
     backtraceCopy = backtraceCopy.Pop();
   }
   return result;

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=91417e4ca39c216c9ca12a3418554ec7c6ba0950
commit 91417e4ca39c216c9ca12a3418554ec7c6ba0950
Author:     Daniel Pfeifer <daniel at pfeifer-mail.de>
AuthorDate: Tue Aug 15 22:37:05 2017 +0200
Commit:     Daniel Pfeifer <daniel at pfeifer-mail.de>
CommitDate: Tue Aug 15 22:37:05 2017 +0200

    cmServerProtocol: pass cmBacktraceRange by value

diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx
index b371e9e..557bee0 100644
--- a/Source/cmServerProtocol.cxx
+++ b/Source/cmServerProtocol.cxx
@@ -754,7 +754,7 @@ static Json::Value DumpBacktrace(const cmListFileBacktrace& backtrace)
 }
 
 static void DumpBacktraceRange(Json::Value& result, const std::string& type,
-                               const cmBacktraceRange& range)
+                               cmBacktraceRange range)
 {
   for (const auto& bt : range) {
     Json::Value obj = Json::objectValue;

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a428b87ccfa5fe186246f7faef42db11ba85fa74
commit a428b87ccfa5fe186246f7faef42db11ba85fa74
Merge: 8ebd590 6293025
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Aug 15 13:55:54 2017 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Aug 15 13:55:54 2017 -0400

    Merge branch 'backport-FindCygwin-fix-regression' into FindCygwin-fix-regression

diff --cc Modules/FindCygwin.cmake
index 086c7dc,c6913da..092a3bd
--- a/Modules/FindCygwin.cmake
+++ b/Modules/FindCygwin.cmake
@@@ -8,16 -8,17 +8,19 @@@
  # this module looks for Cygwin
  
  if (WIN32)
-   find_program(CYGWIN_INSTALL_PATH
+   if(CYGWIN_INSTALL_PATH)
+     set(CYGWIN_BAT "${CYGWIN_INSTALL_PATH}/cygwin.bat")
+   endif()
+ 
+   find_program(CYGWIN_BAT
 -    cygwin.bat
 -    "C:/Cygwin"
 -    "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Cygwin\\setup;rootdir]"
 -    "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Cygnus Solutions\\Cygwin\\mounts v2\\/;native]"
 +    NAMES cygwin.bat
 +    PATHS
 +      "C:/Cygwin"
 +      "C:/Cygwin64"
 +      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Cygwin\\setup;rootdir]"
 +      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Cygnus Solutions\\Cygwin\\mounts v2\\/;native]"
    )
-   get_filename_component(CYGWIN_INSTALL_PATH "${CYGWIN_INSTALL_PATH}" DIRECTORY)
-   mark_as_advanced(
-     CYGWIN_INSTALL_PATH
-   )
+   get_filename_component(CYGWIN_INSTALL_PATH "${CYGWIN_BAT}" DIRECTORY)
+   mark_as_advanced(CYGWIN_BAT)
+ 
  endif ()

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5868be86779b628e49226b3b4139f86e5a0ccb69
commit 5868be86779b628e49226b3b4139f86e5a0ccb69
Author:     Roger Leigh <rleigh at dundee.ac.uk>
AuthorDate: Thu Aug 10 10:31:36 2017 +0100
Commit:     Roger Leigh <rleigh at codelibre.net>
CommitDate: Sat Aug 12 01:12:46 2017 +0100

    FindIce: Add support for Ice 3.7.0
    
    - Search for NuGet packages on Windows, which is the new way the
      official binary builds are distributed for 3.7.0
    - Search for C++11 versions of libraries, with "++11" suffix,
      taking Windows naming inconsistencies into account (Windows
      libraries have a "37" suffix, but this is placed /before/
      the "++11".
    - Add new Ice 3.7 programs
    - Document new Ice 3.7 components
    - Add debug output for search suffixes
    - Simplify debug logic

diff --git a/Modules/FindIce.cmake b/Modules/FindIce.cmake
index e0286ee..a8133da 100644
--- a/Modules/FindIce.cmake
+++ b/Modules/FindIce.cmake
@@ -10,8 +10,16 @@
 #
 # This module supports multiple components.
 # Components can include any of: ``Freeze``, ``Glacier2``, ``Ice``,
-# ``IceBox``, ``IceDB``, ``IceGrid``, ``IcePatch``, ``IceSSL``,
-# ``IceStorm``, ``IceUtil``, ``IceXML``, or ``Slice``.
+# ``IceBox``, ``IceDB``, ``IceDiscovery``, ``IceGrid``,
+# ``IceLocatorDiscovery``, ``IcePatch``, ``IceSSL``, ``IceStorm``,
+# ``IceUtil``, ``IceXML``, or ``Slice``.
+#
+# Ice 3.7 and later also include C++11-specific components:
+# ``Glacier2++11``, ``Ice++11``, ``IceBox++11``, ``IceDiscovery++11``
+# ``IceGrid``, ``IceLocatorDiscovery++11``, ``IceSSL++11``,
+# ``IceStorm++11``
+#
+# Note that the set of supported components is Ice version-specific.
 #
 # This module reports information about the Ice installation in
 # several variables.  General variables::
@@ -28,7 +36,7 @@
 #   Ice::<C>
 #
 # Where ``<C>`` is the name of an Ice component, for example
-# ``Ice::Glacier2``.
+# ``Ice::Glacier2`` or ``Ice++11``.
 #
 # Ice slice programs are reported in::
 #
@@ -39,6 +47,7 @@
 #   Ice_SLICE2HTML_EXECUTABLE - path to slice2html executable
 #   Ice_SLICE2JAVA_EXECUTABLE - path to slice2java executable
 #   Ice_SLICE2JS_EXECUTABLE - path to slice2js executable
+#   Ice_SLICE2OBJC_EXECUTABLE - path to slice2objc executable
 #   Ice_SLICE2PHP_EXECUTABLE - path to slice2php executable
 #   Ice_SLICE2PY_EXECUTABLE - path to slice2py executable
 #   Ice_SLICE2RB_EXECUTABLE - path to slice2rb executable
@@ -47,10 +56,13 @@
 #
 #   Ice_GLACIER2ROUTER_EXECUTABLE - path to glacier2router executable
 #   Ice_ICEBOX_EXECUTABLE - path to icebox executable
+#   Ice_ICEBOXXX11_EXECUTABLE - path to icebox++11 executable
 #   Ice_ICEBOXADMIN_EXECUTABLE - path to iceboxadmin executable
 #   Ice_ICEBOXD_EXECUTABLE - path to iceboxd executable
 #   Ice_ICEBOXNET_EXECUTABLE - path to iceboxnet executable
+#   Ice_ICEBRIDGE_EXECUTABLE - path to icebridge executable
 #   Ice_ICEGRIDADMIN_EXECUTABLE - path to icegridadmin executable
+#   Ice_ICEGRIDDB_EXECUTABLE - path to icegriddb executable
 #   Ice_ICEGRIDNODE_EXECUTABLE - path to icegridnode executable
 #   Ice_ICEGRIDNODED_EXECUTABLE - path to icegridnoded executable
 #   Ice_ICEGRIDREGISTRY_EXECUTABLE - path to icegridregistry executable
@@ -60,6 +72,7 @@
 #   Ice_ICEPATCH2SERVER_EXECUTABLE - path to icepatch2server executable
 #   Ice_ICESERVICEINSTALL_EXECUTABLE - path to iceserviceinstall executable
 #   Ice_ICESTORMADMIN_EXECUTABLE - path to icestormadmin executable
+#   Ice_ICESTORMDB_EXECUTABLE - path to icestormdb executable
 #   Ice_ICESTORMMIGRATE_EXECUTABLE - path to icestormmigrate executable
 #
 # Ice db programs (Windows only; standard system versions on all other
@@ -95,6 +108,13 @@
 # The environment variable ``ICE_HOME`` may also be used; the
 # Ice_HOME variable takes precedence.
 #
+# .. note::
+#   On Windows, Ice 3.7.0 and later provide libraries via the NuGet
+#   package manager.  Appropriate NuGet packages will be searched for
+#   using ``CMAKE_PREFIX_PATH``, or alternatively ``Ice_HOME`` may be
+#   set to the location of a specific NuGet package to restrict the
+#   search.
+#
 # The following cache variables may also be set::
 #
 #   Ice_<P>_EXECUTABLE - the path to executable <P>
@@ -124,12 +144,67 @@
 
 # Written by Roger Leigh <rleigh at codelibre.net>
 
+  set(_Ice_db_programs
+      db_archive
+      db_checkpoint
+      db_deadlock
+      db_dump
+      db_hotbackup
+      db_load
+      db_log_verify
+      db_printlog
+      db_recover
+      db_stat
+      db_tuner
+      db_upgrade
+      db_verify
+      dumpdb
+      transformdb)
+
+  set(_Ice_programs
+      glacier2router
+      icebox
+      icebox++11
+      iceboxadmin
+      iceboxd
+      iceboxnet
+      icebridge
+      icegridadmin
+      icegriddb
+      icegridnode
+      icegridnoded
+      icegridregistry
+      icegridregistryd
+      icepatch2calc
+      icepatch2client
+      icepatch2server
+      iceserviceinstall
+      icestormadmin
+      icestormdb
+      icestormmigrate)
+
+  set(_Ice_slice_programs
+      slice2cpp
+      slice2cs
+      slice2freezej
+      slice2freeze
+      slice2html
+      slice2java
+      slice2js
+      slice2objc
+      slice2php
+      slice2py
+      slice2rb)
+
+
 # The Ice checks are contained in a function due to the large number
 # of temporary variables needed.
 function(_Ice_FIND)
   # Released versions of Ice, including generic short forms
   set(ice_versions
       3
+      3.7
+      3.7.0
       3.6
       3.6.3
       3.6.2
@@ -146,6 +221,14 @@ function(_Ice_FIND)
       3.3.1
       3.3.0)
 
+  foreach(ver ${ice_versions})
+    string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\$" two_digit_version_match "${ver}")
+    if(two_digit_version_match)
+      string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\$" "\\1\\2" two_digit_version "${ver}")
+      list(APPEND ice_suffix_versions "${two_digit_version}")
+    endif()
+  endforeach()
+
   # Set up search paths, taking compiler into account.  Search Ice_HOME,
   # with ICE_HOME in the environment as a fallback if unset.
   if(Ice_HOME)
@@ -159,52 +242,77 @@ function(_Ice_FIND)
     endif()
   endif()
 
+  set(_bin "bin/Win32")
+  set(_lib "lib/Win32")
   if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+    set(_bin "bin/x64")
+    set(_lib "lib/x64")
     # 64-bit path suffix
     set(_x64 "/x64")
     # 64-bit library directory
     set(_lib64 "lib64")
   endif()
 
-  if(MSVC_VERSION)
-    # VS 8.0
-    if(NOT MSVC_VERSION VERSION_LESS 1400 AND MSVC_VERSION VERSION_LESS 1500)
-      set(vcver "vc80")
-      set(vcyear "2005")
-    # VS 9.0
-    elseif(NOT MSVC_VERSION VERSION_LESS 1500 AND MSVC_VERSION VERSION_LESS 1600)
-      set(vcver "vc90")
+  unset(vcvers)
+  if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
+    if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.10)
+      set(vcvers "141;140")
+    elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19)
+      set(vcvers "140")
+    elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18)
+      set(vcvers "120")
+    elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17)
+      set(vcvers "110")
+    elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16)
+      set(vcvers "100")
+    elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15)
+      set(vcvers "90")
       set(vcyear "2008")
-    # VS 10.0
-    elseif(NOT MSVC_VERSION VERSION_LESS 1600 AND MSVC_VERSION VERSION_LESS 1700)
-      set(vcver "vc100")
-    # VS 11.0
-    elseif(NOT MSVC_VERSION VERSION_LESS 1700 AND MSVC_VERSION VERSION_LESS 1800)
-      set(vcver "vc110")
-    # VS 12.0
-    elseif(NOT MSVC_VERSION VERSION_LESS 1800 AND MSVC_VERSION VERSION_LESS 1900)
-      set(vcver "vc120")
-    # VS 14.0
-    elseif(NOT MSVC_VERSION VERSION_LESS 1900 AND MSVC_VERSION VERSION_LESS 2000)
-      set(vcver "vc140")
+    elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14)
+      set(vcvers "80")
+      set(vcyear "2005")
+    else() # Unknown version
+      set(vcvers Unknown)
     endif()
   endif()
 
   # For compatibility with ZeroC Windows builds.
-  if(vcver)
-    # Earlier Ice (3.3) builds don't use vcnnn subdirectories, but are harmless to check.
-    list(APPEND ice_binary_suffixes "bin/${vcver}${_x64}" "bin/${vcver}")
-    list(APPEND ice_library_suffixes "lib/${vcver}${_x64}" "lib/${vcver}")
+  if(vcvers)
+    list(APPEND ice_binary_suffixes "build/native/${_bin}/Release" "tools")
+    list(APPEND ice_debug_library_suffixes "build/native/${_lib}/Debug")
+    list(APPEND ice_release_library_suffixes "build/native/${_lib}/Release")
+    foreach(vcver IN LISTS vcvers)
+      # Earlier Ice (3.3) builds don't use vcnnn subdirectories, but are harmless to check.
+      list(APPEND ice_binary_suffixes "bin/vc${vcver}${_x64}" "bin/vc${vcver}")
+      list(APPEND ice_debug_library_suffixes "lib/vc${vcver}${_x64}" "lib/vc${vcver}")
+      list(APPEND ice_release_library_suffixes "lib/vc${vcver}${_x64}" "lib/vc${vcver}")
+    endforeach()
   endif()
   # Generic 64-bit and 32-bit directories
   list(APPEND ice_binary_suffixes "bin${_x64}" "bin")
-  list(APPEND ice_library_suffixes "libx32" "${_lib64}" "lib${_x64}" "lib")
+  list(APPEND ice_debug_library_suffixes "libx32" "${_lib64}" "lib${_x64}" "lib")
+  list(APPEND ice_release_library_suffixes "libx32" "${_lib64}" "lib${_x64}" "lib")
+  if(vcvers)
+    list(APPEND ice_include_suffixes "build/native/include")
+  endif()
   list(APPEND ice_include_suffixes "include")
   list(APPEND ice_slice_suffixes "slice")
 
   # On Windows, look in the registry for install locations.  Different
   # versions of Ice install support different compiler versions.
-  if(vcver)
+  if(vcvers)
+    foreach(ice_version ${ice_versions})
+      foreach(vcver IN LISTS vcvers)
+        list(APPEND ice_nuget_dirs "zeroc.ice.v${vcver}.${ice_version}")
+      endforeach()
+    endforeach()
+    find_path(Ice_NUGET_DIR
+              NAMES "tools/slice2cpp.exe"
+              PATH_SUFFIXES ${ice_nuget_dirs}
+              DOC "Ice NuGet directory")
+    if(Ice_NUGET_DIR)
+      list(APPEND ice_roots "${Ice_NUGET_DIR}")
+    endif()
     foreach(ice_version ${ice_versions})
       # Ice 3.3 releases use a Visual Studio year suffix and value is
       # enclosed in double quotes, though only the leading quote is
@@ -239,55 +347,8 @@ function(_Ice_FIND)
     endforeach()
   endif()
 
-  set(db_programs
-      db_archive
-      db_checkpoint
-      db_deadlock
-      db_dump
-      db_hotbackup
-      db_load
-      db_log_verify
-      db_printlog
-      db_recover
-      db_stat
-      db_tuner
-      db_upgrade
-      db_verify
-      dumpdb
-      transformdb)
-
-  set(ice_programs
-      glacier2router
-      icebox
-      iceboxadmin
-      iceboxd
-      iceboxnet
-      icegridadmin
-      icegridnode
-      icegridnoded
-      icegridregistry
-      icegridregistryd
-      icepatch2calc
-      icepatch2client
-      icepatch2server
-      iceserviceinstall
-      icestormadmin
-      icestormmigrate)
-
-  set(slice_programs
-      slice2cpp
-      slice2cs
-      slice2freezej
-      slice2freeze
-      slice2html
-      slice2java
-      slice2js
-      slice2php
-      slice2py
-      slice2rb)
-
   # Find all Ice programs
-  foreach(program ${db_programs} ${ice_programs} ${slice_programs})
+  foreach(program ${_Ice_db_programs} ${_Ice_programs} ${_Ice_slice_programs})
     string(TOUPPER "${program}" program_upcase)
     set(cache_var "Ice_${program_upcase}_EXECUTABLE")
     set(program_var "Ice_${program_upcase}_EXECUTABLE")
@@ -336,6 +397,7 @@ function(_Ice_FIND)
   list(APPEND ice_slice_suffixes
        "Ice-${Ice_VERSION_SLICE2CPP_FULL}/slice"
        "Ice-${Ice_VERSION_SLICE2CPP_SHORT}/slice"
+       "ice/slice"
        Ice)
 
   # Find slice directory
@@ -356,13 +418,39 @@ function(_Ice_FIND)
     set(component_cache_release "${component_cache}_RELEASE")
     set(component_cache_debug "${component_cache}_DEBUG")
     set(component_found "${component_upcase}_FOUND")
-    find_library("${component_cache_release}" "${component}"
+    set(component_library "${component}")
+    unset(component_library_release_names)
+    unset(component_library_debug_names)
+    if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
+      string(REGEX MATCH ".+\\+\\+11$" component_library_cpp11 "${component_library}")
+      if(component_library_cpp11)
+        string(REGEX REPLACE "^(.+)(\\+\\+11)$" "\\1" component_library "${component_library}")
+      endif()
+      foreach(suffix_ver ${ice_suffix_versions})
+        set(_name "${component_library}${suffix_ver}")
+        if(component_library_cpp11)
+          string(APPEND _name "++11")
+        endif()
+        list(APPEND component_library_debug_names "${_name}d")
+        list(APPEND component_library_release_names "${_name}")
+      endforeach()
+      set(_name "${component_library}")
+      if(component_library_cpp11)
+        string(APPEND _name "++11")
+      endif()
+      list(APPEND component_library_debug_names "${_name}d")
+      list(APPEND component_library_release_names "${_name}")
+    else()
+      list(APPEND component_library_debug_names "${component_library}d")
+      list(APPEND component_library_release_names "${component_library}")
+    endif()
+    find_library("${component_cache_release}" ${component_library_release_names}
       HINTS ${ice_roots}
-      PATH_SUFFIXES ${ice_library_suffixes}
+      PATH_SUFFIXES ${ice_release_library_suffixes}
       DOC "Ice ${component} library (release)")
-    find_library("${component_cache_debug}" "${component}d"
+    find_library("${component_cache_debug}" ${component_library_debug_names}
       HINTS ${ice_roots}
-      PATH_SUFFIXES ${ice_library_suffixes}
+      PATH_SUFFIXES ${ice_debug_library_suffixes}
       DOC "Ice ${component} library (debug)")
     include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
     select_library_configurations(Ice_${component_upcase})
@@ -410,9 +498,14 @@ function(_Ice_FIND)
   if(Ice_DEBUG)
     message(STATUS "--------FindIce.cmake search debug--------")
     message(STATUS "ICE binary path search order: ${ice_roots}")
+    message(STATUS "ICE binary suffixes: ${ice_binary_suffixes}")
     message(STATUS "ICE include path search order: ${ice_roots}")
+    message(STATUS "ICE include suffixes: ${ice_include_suffixes}")
     message(STATUS "ICE slice path search order: ${ice_roots} ${ice_slice_paths}")
+    message(STATUS "ICE slice suffixes: ${ice_slice_suffixes}")
     message(STATUS "ICE library path search order: ${ice_roots}")
+    message(STATUS "ICE debug library suffixes: ${ice_debug_library_suffixes}")
+    message(STATUS "ICE release library suffixes: ${ice_release_library_suffixes}")
     message(STATUS "----------------")
   endif()
 endfunction()
@@ -489,49 +582,10 @@ if(Ice_DEBUG)
   message(STATUS "Ice_SLICE_DIR directory: ${Ice_SLICE_DIR}")
   message(STATUS "Ice_LIBRARIES: ${Ice_LIBRARIES}")
 
-  message(STATUS "slice2cpp executable: ${Ice_SLICE2CPP_EXECUTABLE}")
-  message(STATUS "slice2cs executable: ${Ice_SLICE2CS_EXECUTABLE}")
-  message(STATUS "slice2freezej executable: ${Ice_SLICE2FREEZEJ_EXECUTABLE}")
-  message(STATUS "slice2freeze executable: ${Ice_SLICE2FREEZE_EXECUTABLE}")
-  message(STATUS "slice2html executable: ${Ice_SLICE2HTML_EXECUTABLE}")
-  message(STATUS "slice2java executable: ${Ice_SLICE2JAVA_EXECUTABLE}")
-  message(STATUS "slice2js executable: ${Ice_SLICE2JS_EXECUTABLE}")
-  message(STATUS "slice2php executable: ${Ice_SLICE2PHP_EXECUTABLE}")
-  message(STATUS "slice2py executable: ${Ice_SLICE2PY_EXECUTABLE}")
-  message(STATUS "slice2rb executable: ${Ice_SLICE2RB_EXECUTABLE}")
-  message(STATUS "glacier2router executable: ${Ice_GLACIER2ROUTER_EXECUTABLE}")
-
-  message(STATUS "icebox executable: ${Ice_ICEBOX_EXECUTABLE}")
-  message(STATUS "iceboxadmin executable: ${Ice_ICEBOXADMIN_EXECUTABLE}")
-  message(STATUS "iceboxd executable: ${Ice_ICEBOXD_EXECUTABLE}")
-  message(STATUS "iceboxnet executable: ${Ice_ICEBOXNET_EXECUTABLE}")
-  message(STATUS "icegridadmin executable: ${Ice_ICEGRIDADMIN_EXECUTABLE}")
-  message(STATUS "icegridnode executable: ${Ice_ICEGRIDNODE_EXECUTABLE}")
-  message(STATUS "icegridnoded executable: ${Ice_ICEGRIDNODED_EXECUTABLE}")
-  message(STATUS "icegridregistry executable: ${Ice_ICEGRIDREGISTRY_EXECUTABLE}")
-  message(STATUS "icegridregistryd executable: ${Ice_ICEGRIDREGISTRYD_EXECUTABLE}")
-  message(STATUS "icepatch2calc executable: ${Ice_ICEPATCH2CALC_EXECUTABLE}")
-  message(STATUS "icepatch2client executable: ${Ice_ICEPATCH2CLIENT_EXECUTABLE}")
-  message(STATUS "icepatch2server executable: ${Ice_ICEPATCH2SERVER_EXECUTABLE}")
-  message(STATUS "iceserviceinstall executable: ${Ice_ICESERVICEINSTALL_EXECUTABLE}")
-  message(STATUS "icestormadmin executable: ${Ice_ICESTORMADMIN_EXECUTABLE}")
-  message(STATUS "icestormmigrate executable: ${Ice_ICESTORMMIGRATE_EXECUTABLE}")
-
-  message(STATUS "db_archive executable: ${Ice_DB_ARCHIVE_EXECUTABLE}")
-  message(STATUS "db_checkpoint executable: ${Ice_DB_CHECKPOINT_EXECUTABLE}")
-  message(STATUS "db_deadlock executable: ${Ice_DB_DEADLOCK_EXECUTABLE}")
-  message(STATUS "db_dump executable: ${Ice_DB_DUMP_EXECUTABLE}")
-  message(STATUS "db_hotbackup executable: ${Ice_DB_HOTBACKUP_EXECUTABLE}")
-  message(STATUS "db_load executable: ${Ice_DB_LOAD_EXECUTABLE}")
-  message(STATUS "db_log_verify executable: ${Ice_DB_LOG_VERIFY_EXECUTABLE}")
-  message(STATUS "db_printlog executable: ${Ice_DB_PRINTLOG_EXECUTABLE}")
-  message(STATUS "db_recover executable: ${Ice_DB_RECOVER_EXECUTABLE}")
-  message(STATUS "db_stat executable: ${Ice_DB_STAT_EXECUTABLE}")
-  message(STATUS "db_tuner executable: ${Ice_DB_TUNER_EXECUTABLE}")
-  message(STATUS "db_upgrade executable: ${Ice_DB_UPGRADE_EXECUTABLE}")
-  message(STATUS "db_verify executable: ${Ice_DB_VERIFY_EXECUTABLE}")
-  message(STATUS "dumpdb executable: ${Ice_DUMPDB_EXECUTABLE}")
-  message(STATUS "transformdb executable: ${Ice_TRANSFORMDB_EXECUTABLE}")
+  foreach(program ${_Ice_db_programs} ${_Ice_programs} ${_Ice_slice_programs})
+    string(TOUPPER "${program}" program_upcase)
+    message(STATUS "${program} executable: ${Ice_${program_upcase}_EXECUTABLE}")
+  endforeach()
 
   foreach(component ${Ice_FIND_COMPONENTS})
     string(TOUPPER "${component}" component_upcase)
@@ -542,3 +596,7 @@ if(Ice_DEBUG)
   endforeach()
   message(STATUS "----------------")
 endif()
+
+unset(_Ice_db_programs)
+unset(_Ice_programs)
+unset(_Ice_slice_programs)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d8ecc2545798c77ec5bf22bb420a3343d4843ef6
commit d8ecc2545798c77ec5bf22bb420a3343d4843ef6
Author:     Sylvain Joubert <joubert.sy at gmail.com>
AuthorDate: Fri Aug 11 13:26:33 2017 +0200
Commit:     Sylvain Joubert <joubert.sy at gmail.com>
CommitDate: Fri Aug 11 13:26:33 2017 +0200

    Add PREPEND sub-command to string command

diff --git a/Help/command/string.rst b/Help/command/string.rst
index 4f0c45c..ba4a412 100644
--- a/Help/command/string.rst
+++ b/Help/command/string.rst
@@ -132,6 +132,15 @@ APPEND
 
 Append all the input arguments to the string.
 
+PREPEND
+"""""""
+
+::
+
+  string(PREPEND <string variable> [<input>...])
+
+Prepend all the input arguments to the string.
+
 CONCAT
 """"""
 
diff --git a/Help/release/dev/string_prepend.rst b/Help/release/dev/string_prepend.rst
new file mode 100644
index 0000000..f896e91
--- /dev/null
+++ b/Help/release/dev/string_prepend.rst
@@ -0,0 +1,4 @@
+string_prepend
+--------------
+
+* The :command:`string` command learned a new ``PREPEND`` subcommand.
diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx
index 5a6cf48..b07eae1 100644
--- a/Source/cmStringCommand.cxx
+++ b/Source/cmStringCommand.cxx
@@ -62,6 +62,9 @@ bool cmStringCommand::InitialPass(std::vector<std::string> const& args,
   if (subCommand == "APPEND") {
     return this->HandleAppendCommand(args);
   }
+  if (subCommand == "PREPEND") {
+    return this->HandlePrependCommand(args);
+  }
   if (subCommand == "CONCAT") {
     return this->HandleConcatCommand(args);
   }
@@ -643,6 +646,30 @@ bool cmStringCommand::HandleAppendCommand(std::vector<std::string> const& args)
   return true;
 }
 
+bool cmStringCommand::HandlePrependCommand(
+  std::vector<std::string> const& args)
+{
+  if (args.size() < 2) {
+    this->SetError("sub-command PREPEND requires at least one argument.");
+    return false;
+  }
+
+  // Skip if nothing to prepend.
+  if (args.size() < 3) {
+    return true;
+  }
+
+  const std::string& variable = args[1];
+
+  std::string value = cmJoin(cmMakeRange(args).advance(2), std::string());
+  const char* oldValue = this->Makefile->GetDefinition(variable);
+  if (oldValue) {
+    value += oldValue;
+  }
+  this->Makefile->AddDefinition(variable, value.c_str());
+  return true;
+}
+
 bool cmStringCommand::HandleConcatCommand(std::vector<std::string> const& args)
 {
   if (args.size() < 2) {
diff --git a/Source/cmStringCommand.h b/Source/cmStringCommand.h
index 88015ad..0dded15 100644
--- a/Source/cmStringCommand.h
+++ b/Source/cmStringCommand.h
@@ -46,6 +46,7 @@ protected:
   bool HandleLengthCommand(std::vector<std::string> const& args);
   bool HandleSubstringCommand(std::vector<std::string> const& args);
   bool HandleAppendCommand(std::vector<std::string> const& args);
+  bool HandlePrependCommand(std::vector<std::string> const& args);
   bool HandleConcatCommand(std::vector<std::string> const& args);
   bool HandleStripCommand(std::vector<std::string> const& args);
   bool HandleRandomCommand(std::vector<std::string> const& args);
diff --git a/Tests/RunCMake/string/Prepend.cmake b/Tests/RunCMake/string/Prepend.cmake
new file mode 100644
index 0000000..8eaeebb
--- /dev/null
+++ b/Tests/RunCMake/string/Prepend.cmake
@@ -0,0 +1,58 @@
+set(out)
+string(PREPEND out)
+if(DEFINED out)
+  message(FATAL_ERROR "\"string(PREPEND out)\" set out to \"${out}\"")
+endif()
+
+set(out "")
+string(PREPEND out)
+if(NOT out STREQUAL "")
+  message(FATAL_ERROR "\"string(PREPEND out)\" set out to \"${out}\"")
+endif()
+
+set(out x)
+string(PREPEND out)
+if(NOT out STREQUAL "x")
+  message(FATAL_ERROR "\"string(PREPEND out)\" set out to \"${out}\"")
+endif()
+
+
+set(out)
+string(PREPEND out a)
+if(NOT out STREQUAL "a")
+  message(FATAL_ERROR "\"string(PREPEND out a)\" set out to \"${out}\"")
+endif()
+
+set(out "")
+string(PREPEND out a)
+if(NOT out STREQUAL "a")
+  message(FATAL_ERROR "\"string(PREPEND out a)\" set out to \"${out}\"")
+endif()
+
+set(out x)
+string(PREPEND out a)
+if(NOT out STREQUAL "ax")
+  message(FATAL_ERROR "\"string(PREPEND out a)\" set out to \"${out}\"")
+endif()
+
+
+set(out x)
+string(PREPEND out a "b")
+if(NOT out STREQUAL "abx")
+  message(FATAL_ERROR "\"string(PREPEND out a \"b\")\" set out to \"${out}\"")
+endif()
+
+set(b)
+set(out x)
+string(PREPEND out ${b})
+if(NOT out STREQUAL "x")
+  message(FATAL_ERROR "\"string(PREPEND out \${b})\" set out to \"${out}\"")
+endif()
+
+set(b b)
+set(out x)
+string(PREPEND out a "${b}" [[
+${c}]])
+if(NOT out STREQUAL "ab\${c}x")
+  message(FATAL_ERROR "\"string(PREPEND out a \"\${b}\" [[\${c}]])\" set out to \"${out}\"")
+endif()
diff --git a/Tests/RunCMake/string/PrependNoArgs-result.txt b/Tests/RunCMake/string/PrependNoArgs-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/string/PrependNoArgs-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/string/PrependNoArgs-stderr.txt b/Tests/RunCMake/string/PrependNoArgs-stderr.txt
new file mode 100644
index 0000000..8d433f9
--- /dev/null
+++ b/Tests/RunCMake/string/PrependNoArgs-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at PrependNoArgs.cmake:1 \(string\):
+  string sub-command PREPEND requires at least one argument.
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/string/PrependNoArgs.cmake b/Tests/RunCMake/string/PrependNoArgs.cmake
new file mode 100644
index 0000000..f324f28
--- /dev/null
+++ b/Tests/RunCMake/string/PrependNoArgs.cmake
@@ -0,0 +1 @@
+string(PREPEND)
diff --git a/Tests/RunCMake/string/RunCMakeTest.cmake b/Tests/RunCMake/string/RunCMakeTest.cmake
index 32b61b5..513d1e3 100644
--- a/Tests/RunCMake/string/RunCMakeTest.cmake
+++ b/Tests/RunCMake/string/RunCMakeTest.cmake
@@ -3,6 +3,9 @@ include(RunCMake)
 run_cmake(Append)
 run_cmake(AppendNoArgs)
 
+run_cmake(Prepend)
+run_cmake(PrependNoArgs)
+
 run_cmake(Concat)
 run_cmake(ConcatNoArgs)
 

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

Summary of changes:
 Help/command/string.rst                            |    9 +
 Help/release/dev/string_prepend.rst                |    4 +
 Modules/CMakeCUDAInformation.cmake                 |    4 +-
 Modules/Compiler/Clang-FindBinUtils.cmake          |    8 +
 Modules/FindCygwin.cmake                           |   13 +-
 Modules/FindIce.cmake                              |  306 ++++++++++++--------
 Source/cmServerProtocol.cxx                        |    4 +-
 Source/cmStringCommand.cxx                         |   27 ++
 Source/cmStringCommand.h                           |    1 +
 Tests/RunCMake/string/Prepend.cmake                |   58 ++++
 .../PrependNoArgs-result.txt}                      |    0
 Tests/RunCMake/string/PrependNoArgs-stderr.txt     |    4 +
 Tests/RunCMake/string/PrependNoArgs.cmake          |    1 +
 Tests/RunCMake/string/RunCMakeTest.cmake           |    3 +
 14 files changed, 309 insertions(+), 133 deletions(-)
 create mode 100644 Help/release/dev/string_prepend.rst
 create mode 100644 Tests/RunCMake/string/Prepend.cmake
 copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => string/PrependNoArgs-result.txt} (100%)
 create mode 100644 Tests/RunCMake/string/PrependNoArgs-stderr.txt
 create mode 100644 Tests/RunCMake/string/PrependNoArgs.cmake


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list