[Cmake-commits] CMake branch, next, updated. v3.8.0-746-g8579789

Kitware Robot kwrobot at kitware.com
Wed Apr 12 12: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, next has been updated
       via  85797894702672d7da83888c6212b715c93a2577 (commit)
       via  1205eb67b61c00f3ea8591619bc2f53c8eb13f88 (commit)
       via  fee011946e4fe0fc20f2f6bf016851402241d554 (commit)
       via  b80c6d120c4f780d579071545ddc7e642b6e6276 (commit)
       via  3b4848717aa23d0238e97fb7d381829e6e47f722 (commit)
      from  8a34b7d4af082dabafc1b66b309d4bf3d222afe5 (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=85797894702672d7da83888c6212b715c93a2577
commit 85797894702672d7da83888c6212b715c93a2577
Merge: 1205eb6 3b48487
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Apr 12 16:48:54 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Wed Apr 12 12:48:58 2017 -0400

    Stage topic 'project-description'
    
    Topic-id: 23560
    Topic-url: https://gitlab.kitware.com/cmake/cmake/merge_requests/679


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1205eb67b61c00f3ea8591619bc2f53c8eb13f88
commit 1205eb67b61c00f3ea8591619bc2f53c8eb13f88
Merge: 8a34b7d fee0119
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Apr 12 16:44:59 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Wed Apr 12 12:45:24 2017 -0400

    Stage topic 'vs-custom-kits-dir'
    
    Topic-id: 23629
    Topic-url: https://gitlab.kitware.com/cmake/cmake/merge_requests/696


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fee011946e4fe0fc20f2f6bf016851402241d554
commit fee011946e4fe0fc20f2f6bf016851402241d554
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Apr 12 10:53:36 2017 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Apr 12 10:57:05 2017 -0400

    VS: Add an environment variable for the Windows 10 kits directory
    
    Define a `CMAKE_WINDOWS_KITS_10_DIR` environment variable to allow
    users to tell CMake about a custom Windows 10 SDK directory.  We
    choose to make this an environment variable rather than a CMake
    variable or cache entry because:
    
    * Using a custom directory also requires custom external MSBuild
      configuration.  Therefore users are already configuring a
      custom environment.
    
    * The custom directory must be set consistently in all parts of
      a build including nested projects.  An environment variable
      avoids requiring users to thread the setting into nested builds.
    
    Fixes: #16743

diff --git a/Help/variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION.rst b/Help/variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION.rst
index e0be3a4..83b9bc1 100644
--- a/Help/variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION.rst
+++ b/Help/variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION.rst
@@ -10,3 +10,8 @@ version.  Otherwise CMake computes a default version based on the Windows
 SDK versions available.  The chosen Windows target version number is provided
 in ``CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION``.  If no Windows 10 SDK
 is available this value will be empty.
+
+One may set a ``CMAKE_WINDOWS_KITS_10_DIR`` *environment variable*
+to an absolute path to tell CMake to look for Windows 10 SDKs in
+a custom location.  The specified directory is expected to contain
+``Include/10.0.*`` directories.
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake
index a3478a3..6d33fc6 100644
--- a/Modules/InstallRequiredSystemLibraries.cmake
+++ b/Modules/InstallRequiredSystemLibraries.cmake
@@ -31,6 +31,11 @@
 #   app-local deployment (e.g. to Windows XP).  This is meaningful
 #   only with MSVC from Visual Studio 2015 or higher.
 #
+#   One may set a ``CMAKE_WINDOWS_KITS_10_DIR`` *environment variable*
+#   to an absolute path to tell CMake to look for Windows 10 SDKs in
+#   a custom location.  The specified directory is expected to contain
+#   ``Redist/ucrt/DLLs/*`` directories.
+#
 # ``CMAKE_INSTALL_MFC_LIBRARIES``
 #   Set to TRUE to install the MSVC MFC runtime libraries.
 #
@@ -258,6 +263,7 @@ if(MSVC)
       set(programfilesx86 "ProgramFiles(x86)")
       find_path(WINDOWS_KITS_DIR NAMES Redist/ucrt/DLLs/${CMAKE_MSVC_ARCH}/ucrtbase.dll
         PATHS
+        $ENV{CMAKE_WINDOWS_KITS_10_DIR}
         "${windows_kits_dir}"
         "$ENV{ProgramFiles}/Windows Kits/10"
         "$ENV{${programfilesx86}}/Windows Kits/10"
diff --git a/Source/cmGlobalVisualStudio14Generator.cxx b/Source/cmGlobalVisualStudio14Generator.cxx
index 4602d93..df086d3 100644
--- a/Source/cmGlobalVisualStudio14Generator.cxx
+++ b/Source/cmGlobalVisualStudio14Generator.cxx
@@ -220,6 +220,14 @@ std::string cmGlobalVisualStudio14Generator::GetWindows10SDKVersion()
   std::vector<std::string> win10Roots;
 
   {
+    std::string win10Root;
+    if (cmSystemTools::GetEnv("CMAKE_WINDOWS_KITS_10_DIR", win10Root)) {
+      cmSystemTools::ConvertToUnixSlashes(win10Root);
+      win10Roots.push_back(win10Root);
+    }
+  }
+
+  {
     // This logic is taken from the vcvarsqueryregistry.bat file from VS2015
     // Try HKLM and then HKCU.
     std::string win10Root;

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b80c6d120c4f780d579071545ddc7e642b6e6276
commit b80c6d120c4f780d579071545ddc7e642b6e6276
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Apr 12 10:38:05 2017 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Apr 12 10:38:49 2017 -0400

    VS: Refactor Win 10 Kits root detection to support multiple roots

diff --git a/Source/cmGlobalVisualStudio14Generator.cxx b/Source/cmGlobalVisualStudio14Generator.cxx
index d2ac36b..4602d93 100644
--- a/Source/cmGlobalVisualStudio14Generator.cxx
+++ b/Source/cmGlobalVisualStudio14Generator.cxx
@@ -217,24 +217,36 @@ struct NoWindowsH
 std::string cmGlobalVisualStudio14Generator::GetWindows10SDKVersion()
 {
 #if defined(_WIN32) && !defined(__CYGWIN__)
-  // This logic is taken from the vcvarsqueryregistry.bat file from VS2015
-  // Try HKLM and then HKCU.
-  std::string win10Root;
-  if (!cmSystemTools::ReadRegistryValue(
-        "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\"
-        "Windows Kits\\Installed Roots;KitsRoot10",
-        win10Root, cmSystemTools::KeyWOW64_32) &&
-      !cmSystemTools::ReadRegistryValue(
-        "HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\"
-        "Windows Kits\\Installed Roots;KitsRoot10",
-        win10Root, cmSystemTools::KeyWOW64_32)) {
+  std::vector<std::string> win10Roots;
+
+  {
+    // This logic is taken from the vcvarsqueryregistry.bat file from VS2015
+    // Try HKLM and then HKCU.
+    std::string win10Root;
+    if (cmSystemTools::ReadRegistryValue(
+          "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\"
+          "Windows Kits\\Installed Roots;KitsRoot10",
+          win10Root, cmSystemTools::KeyWOW64_32) ||
+        cmSystemTools::ReadRegistryValue(
+          "HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\"
+          "Windows Kits\\Installed Roots;KitsRoot10",
+          win10Root, cmSystemTools::KeyWOW64_32)) {
+      cmSystemTools::ConvertToUnixSlashes(win10Root);
+      win10Roots.push_back(win10Root);
+    }
+  }
+
+  if (win10Roots.empty()) {
     return std::string();
   }
 
   std::vector<std::string> sdks;
-  std::string path = win10Root + "Include/*";
   // Grab the paths of the different SDKs that are installed
-  cmSystemTools::GlobDirs(path, sdks);
+  for (std::vector<std::string>::iterator i = win10Roots.begin();
+       i != win10Roots.end(); ++i) {
+    std::string path = *i + "/Include/*";
+    cmSystemTools::GlobDirs(path, sdks);
+  }
 
   // Skip SDKs that do not contain <um/windows.h> because that indicates that
   // only the UCRT MSIs were installed for them.

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3b4848717aa23d0238e97fb7d381829e6e47f722
commit 3b4848717aa23d0238e97fb7d381829e6e47f722
Author:     Alex Turbov <i.zaufi at gmail.com>
AuthorDate: Sun Apr 9 00:39:06 2017 +0700
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Apr 11 10:17:00 2017 -0400

    project: Add `DESCRIPTION` parameter
    
    It is quite often the project description has used in a real world software.
    Examples include:
    
    * part of a help screen of the application
    * builtin resources (`*.rc` files, data for "About" dialog of a GUI app, & etc)
    * most generators for CPack can use it
    * it could be used by documentary software (Doxygen, Sphinx) which is usually
      integrated to CMake based projects via `add_custom_target()`
    
    Now `project()` call learned an optional `DESCRIPTION` parameter with a
    short string describing a project. Being specified, it would set the
    `PROJECT_DESCRIPTION` variable which could be used in `configure_file()`
    or whatever user wants.  Also `PROJECT_DESCRIPTION` is a default value
    for `CPACK_PACKAGE_DESCRIPTION_SUMMARY`.

diff --git a/Help/command/project.rst b/Help/command/project.rst
index 6c5ace7..139f69c 100644
--- a/Help/command/project.rst
+++ b/Help/command/project.rst
@@ -8,6 +8,7 @@ Set a name, version, and enable languages for the entire project.
  project(<PROJECT-NAME> [LANGUAGES] [<language-name>...])
  project(<PROJECT-NAME>
          [VERSION <major>[.<minor>[.<patch>[.<tweak>]]]]
+         [DESCRIPTION <project-description-string>]
          [LANGUAGES <language-name>...])
 
 Sets the name of the project and stores the name in the
@@ -40,6 +41,10 @@ in variables
 Variables corresponding to unspecified versions are set to the empty string
 (if policy :policy:`CMP0048` is set to ``NEW``).
 
+If optional ``DESCRIPTION`` is given, then additional :variable:`PROJECT_DESCRIPTION`
+variable will be set to its argument. The argument must be a string with short
+description of the project (only a few words).
+
 Optionally you can specify which languages your project supports.
 Example languages are ``C``, ``CXX`` (i.e.  C++), ``Fortran``, etc.
 By default ``C`` and ``CXX`` are enabled if no language options are
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index 9d8d596..038d6e0 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -60,6 +60,7 @@ Variables that Provide Information
    /variable/CMAKE_MINOR_VERSION
    /variable/CMAKE_PARENT_LIST_FILE
    /variable/CMAKE_PATCH_VERSION
+   /variable/CMAKE_PROJECT_DESCRIPTION
    /variable/CMAKE_PROJECT_NAME
    /variable/CMAKE_RANLIB
    /variable/CMAKE_ROOT
@@ -97,6 +98,7 @@ Variables that Provide Information
    /variable/PROJECT-NAME_VERSION_PATCH
    /variable/PROJECT-NAME_VERSION_TWEAK
    /variable/PROJECT_BINARY_DIR
+   /variable/PROJECT_DESCRIPTION
    /variable/PROJECT_NAME
    /variable/PROJECT_SOURCE_DIR
    /variable/PROJECT_VERSION
diff --git a/Help/release/dev/project_description.rst b/Help/release/dev/project_description.rst
new file mode 100644
index 0000000..baf0045
--- /dev/null
+++ b/Help/release/dev/project_description.rst
@@ -0,0 +1,5 @@
+project-description
+-------------------
+
+* The :command:`project` command learned an optional ``DESCRIPTION`` parameter.
+  See :command:`project` command and :variable:`PROJECT_DESCRIPTION` variable.
diff --git a/Help/variable/CMAKE_PROJECT_DESCRIPTION.rst b/Help/variable/CMAKE_PROJECT_DESCRIPTION.rst
new file mode 100644
index 0000000..f1911ec
--- /dev/null
+++ b/Help/variable/CMAKE_PROJECT_DESCRIPTION.rst
@@ -0,0 +1,7 @@
+CMAKE_PROJECT_DESCRIPTION
+-------------------------
+
+The description of the current project.
+
+This specifies description of the current project from the closest inherited
+:command:`project` command.
diff --git a/Help/variable/PROJECT_DESCRIPTION.rst b/Help/variable/PROJECT_DESCRIPTION.rst
new file mode 100644
index 0000000..05ede8f
--- /dev/null
+++ b/Help/variable/PROJECT_DESCRIPTION.rst
@@ -0,0 +1,6 @@
+PROJECT_DESCRIPTION
+-------------------
+
+Short project description given to the project command.
+
+This is the description given to the most recent :command:`project` command.
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake
index 4e7546b..a63fc83 100644
--- a/Modules/CPack.cmake
+++ b/Modules/CPack.cmake
@@ -98,7 +98,12 @@
 #
 # .. variable:: CPACK_PACKAGE_DESCRIPTION_SUMMARY
 #
-#  Short description of the project (only a few words).
+#  Short description of the project (only a few words). Default value is::
+#
+#    ${PROJECT_DESCRIPTION}
+#
+#  if DESCRIPTION has given to the project() call or
+#  CMake generated string with PROJECT_NAME otherwise.
 #
 # .. variable:: CPACK_PACKAGE_FILE_NAME
 #
@@ -360,8 +365,13 @@ _cpack_set_default(CPACK_PACKAGE_VERSION_PATCH "1")
 _cpack_set_default(CPACK_PACKAGE_VERSION
   "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
 _cpack_set_default(CPACK_PACKAGE_VENDOR "Humanity")
-_cpack_set_default(CPACK_PACKAGE_DESCRIPTION_SUMMARY
-  "${CMAKE_PROJECT_NAME} built using CMake")
+if(CMAKE_PROJECT_DESCRIPTION)
+  _cpack_set_default(CPACK_PACKAGE_DESCRIPTION_SUMMARY
+    "${CMAKE_PROJECT_DESCRIPTION}")
+else()
+  _cpack_set_default(CPACK_PACKAGE_DESCRIPTION_SUMMARY
+    "${CMAKE_PROJECT_NAME} built using CMake")
+endif()
 
 _cpack_set_default(CPACK_PACKAGE_DESCRIPTION_FILE
   "${CMAKE_ROOT}/Templates/CPack.GenericDescription.txt")
diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx
index 4e0fa57..66f324a 100644
--- a/Source/cmProjectCommand.cxx
+++ b/Source/cmProjectCommand.cxx
@@ -62,10 +62,13 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
 
   bool haveVersion = false;
   bool haveLanguages = false;
+  bool haveDescription = false;
   std::string version;
+  std::string description;
   std::vector<std::string> languages;
   enum Doing
   {
+    DoingDescription,
     DoingLanguages,
     DoingVersion
   };
@@ -89,9 +92,21 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
       }
       haveVersion = true;
       doing = DoingVersion;
+    } else if (args[i] == "DESCRIPTION") {
+      if (haveDescription) {
+        this->Makefile->IssueMessage(
+          cmake::FATAL_ERROR, "DESCRITPION may be specified at most once.");
+        cmSystemTools::SetFatalErrorOccured();
+        return true;
+      }
+      haveDescription = true;
+      doing = DoingDescription;
     } else if (doing == DoingVersion) {
       doing = DoingLanguages;
       version = args[i];
+    } else if (doing == DoingDescription) {
+      doing = DoingLanguages;
+      description = args[i];
     } else // doing == DoingLanguages
     {
       languages.push_back(args[i]);
@@ -197,6 +212,22 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
     }
   }
 
+  if (haveDescription) {
+    this->Makefile->AddDefinition("PROJECT_DESCRIPTION", description.c_str());
+    // Set the CMAKE_PROJECT_DESCRIPTION variable to be the highest-level
+    // project name in the tree. If there are two project commands
+    // in the same CMakeLists.txt file, and it is the top level
+    // CMakeLists.txt file, then go with the last one.
+    if (!this->Makefile->GetDefinition("CMAKE_PROJECT_DESCRIPTION") ||
+        (this->Makefile->IsRootMakefile())) {
+      this->Makefile->AddDefinition("CMAKE_PROJECT_DESCRIPTION",
+                                    description.c_str());
+      this->Makefile->AddCacheDefinition(
+        "CMAKE_PROJECT_DESCRIPTION", description.c_str(),
+        "Value Computed by CMake", cmStateEnums::STATIC);
+    }
+  }
+
   if (languages.empty()) {
     // if no language is specified do c and c++
     languages.push_back("C");
diff --git a/Tests/RunCMake/project/ProjectDescription-stdout.txt b/Tests/RunCMake/project/ProjectDescription-stdout.txt
new file mode 100644
index 0000000..ffa9092
--- /dev/null
+++ b/Tests/RunCMake/project/ProjectDescription-stdout.txt
@@ -0,0 +1 @@
+PROJECT_DESCRIPTION=Test Project
diff --git a/Tests/RunCMake/project/ProjectDescription.cmake b/Tests/RunCMake/project/ProjectDescription.cmake
new file mode 100644
index 0000000..3a47362
--- /dev/null
+++ b/Tests/RunCMake/project/ProjectDescription.cmake
@@ -0,0 +1,6 @@
+cmake_policy(SET CMP0048 NEW)
+project(ProjectDescriptionTest VERSION 1.0.0 DESCRIPTION "Test Project" LANGUAGES)
+if(NOT PROJECT_DESCRIPTION)
+  message(FATAL_ERROR "PROJECT_DESCRIPTION expected to be set")
+endif()
+message(STATUS "PROJECT_DESCRIPTION=${PROJECT_DESCRIPTION}")
diff --git a/Tests/RunCMake/project/ProjectDescription2-result.txt b/Tests/RunCMake/project/ProjectDescription2-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/project/ProjectDescription2-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/project/ProjectDescription2-stderr.txt b/Tests/RunCMake/project/ProjectDescription2-stderr.txt
new file mode 100644
index 0000000..558e2df
--- /dev/null
+++ b/Tests/RunCMake/project/ProjectDescription2-stderr.txt
@@ -0,0 +1 @@
+  DESCRITPION may be specified at most once.
diff --git a/Tests/RunCMake/project/ProjectDescription2.cmake b/Tests/RunCMake/project/ProjectDescription2.cmake
new file mode 100644
index 0000000..3f186ba
--- /dev/null
+++ b/Tests/RunCMake/project/ProjectDescription2.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0048 NEW)
+project(ProjectDescriptionTest VERSION 1.0.0 DESCRIPTION "Test Project" DESCRIPTION "Only once allowed" LANGUAGES)
diff --git a/Tests/RunCMake/project/RunCMakeTest.cmake b/Tests/RunCMake/project/RunCMakeTest.cmake
index dba97d2..3d13e2e 100644
--- a/Tests/RunCMake/project/RunCMakeTest.cmake
+++ b/Tests/RunCMake/project/RunCMakeTest.cmake
@@ -7,6 +7,8 @@ run_cmake(LanguagesImplicit)
 run_cmake(LanguagesEmpty)
 run_cmake(LanguagesNONE)
 run_cmake(LanguagesTwice)
+run_cmake(ProjectDescription)
+run_cmake(ProjectDescription2)
 run_cmake(VersionAndLanguagesEmpty)
 run_cmake(VersionEmpty)
 run_cmake(VersionInvalid)

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

Summary of changes:
 Help/command/project.rst                           |    5 +++
 Help/manual/cmake-variables.7.rst                  |    2 +
 Help/release/dev/project_description.rst           |    5 +++
 Help/variable/CMAKE_PROJECT_DESCRIPTION.rst        |    7 +++
 .../CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION.rst   |    5 +++
 Help/variable/PROJECT_DESCRIPTION.rst              |    6 +++
 Modules/CPack.cmake                                |   16 +++++--
 Modules/InstallRequiredSystemLibraries.cmake       |    6 +++
 Source/cmGlobalVisualStudio14Generator.cxx         |   46 ++++++++++++++------
 Source/cmProjectCommand.cxx                        |   31 +++++++++++++
 .../RunCMake/project/ProjectDescription-stdout.txt |    1 +
 Tests/RunCMake/project/ProjectDescription.cmake    |    6 +++
 .../ProjectDescription2-result.txt}                |    0
 .../project/ProjectDescription2-stderr.txt         |    1 +
 Tests/RunCMake/project/ProjectDescription2.cmake   |    2 +
 Tests/RunCMake/project/RunCMakeTest.cmake          |    2 +
 16 files changed, 125 insertions(+), 16 deletions(-)
 create mode 100644 Help/release/dev/project_description.rst
 create mode 100644 Help/variable/CMAKE_PROJECT_DESCRIPTION.rst
 create mode 100644 Help/variable/PROJECT_DESCRIPTION.rst
 create mode 100644 Tests/RunCMake/project/ProjectDescription-stdout.txt
 create mode 100644 Tests/RunCMake/project/ProjectDescription.cmake
 copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => project/ProjectDescription2-result.txt} (100%)
 create mode 100644 Tests/RunCMake/project/ProjectDescription2-stderr.txt
 create mode 100644 Tests/RunCMake/project/ProjectDescription2.cmake


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list