[Cmake-commits] CMake branch, master, updated. v3.10.0-rc3-137-gcec4b86

Kitware Robot kwrobot at kitware.com
Wed Oct 25 08:25:03 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  cec4b86f0a271fa9ad67f9c2e779a0f27d74e563 (commit)
       via  74705612781013f7bb07139cf96be9b58880338b (commit)
       via  296eb9ad4c36379c58e2a4461e765de329d23b5d (commit)
       via  b2c6c3574e29d5076af43b4fe5a0220748a8d6ed (commit)
      from  e419a67a56ff33f82498073c91e533981a9fb2d1 (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=cec4b86f0a271fa9ad67f9c2e779a0f27d74e563
commit cec4b86f0a271fa9ad67f9c2e779a0f27d74e563
Merge: 7470561 296eb9a
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Oct 25 12:16:57 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Wed Oct 25 08:17:03 2017 -0400

    Merge topic 'server-codemodel-install-dest'
    
    296eb9ad cmake-server: Add target install destinations to codemodel
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1382


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=74705612781013f7bb07139cf96be9b58880338b
commit 74705612781013f7bb07139cf96be9b58880338b
Merge: e419a67 b2c6c35
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Oct 25 12:15:40 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Wed Oct 25 08:15:43 2017 -0400

    Merge topic 'flang-windows'
    
    b2c6c357 Flang: Add partial support on Windows
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1404


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=296eb9ad4c36379c58e2a4461e765de329d23b5d
commit 296eb9ad4c36379c58e2a4461e765de329d23b5d
Author:     Justin Goshi <jgoshi at microsoft.com>
AuthorDate: Thu Oct 12 17:16:57 2017 -0700
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Oct 24 14:58:07 2017 -0400

    cmake-server: Add target install destinations to codemodel
    
    Protocol version is updated to 1.2 since this is a change
    to what was released in cmake version 3.10.

diff --git a/Help/manual/cmake-server.7.rst b/Help/manual/cmake-server.7.rst
index c56e5a7..389a6d5 100644
--- a/Help/manual/cmake-server.7.rst
+++ b/Help/manual/cmake-server.7.rst
@@ -458,6 +458,8 @@ Each project object can have the following keys:
 
 "name"
   contains the (sub-)projects name.
+"hasInstallRule"
+  true if the project contains any install rules, false otherwise.
 "sourceDirectory"
   contains the current source directory
 "buildDirectory"
@@ -481,6 +483,10 @@ Each target object can have the following keys:
   contains the current source directory.
 "buildDirectory"
   contains the current build directory.
+"hasInstallRule"
+  true if the target contains any install rules, false otherwise.
+"installPaths"
+  full path to the destination directories defined by target install rules.
 "artifacts"
   with a list of build artifacts. The list is sorted with the most
   important artifacts first (e.g. a .DLL file is listed before a
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 0273f5b..7c6cca5 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -665,6 +665,10 @@ public:
   {
     return this->InstallGenerators;
   }
+  const std::vector<cmInstallGenerator*>& GetInstallGenerators() const
+  {
+    return this->InstallGenerators;
+  }
 
   void AddTestGenerator(cmTestGenerator* g)
   {
diff --git a/Source/cmServerDictionary.h b/Source/cmServerDictionary.h
index 405ff6b..03f1cc1 100644
--- a/Source/cmServerDictionary.h
+++ b/Source/cmServerDictionary.h
@@ -88,6 +88,8 @@ static const std::string kWARN_UNUSED_CLI_KEY = "warnUnusedCli";
 static const std::string kWARN_UNUSED_KEY = "warnUnused";
 static const std::string kWATCHED_DIRECTORIES_KEY = "watchedDirectories";
 static const std::string kWATCHED_FILES_KEY = "watchedFiles";
+static const std::string kHAS_INSTALL_RULE = "hasInstallRule";
+static const std::string kINSTALL_PATHS = "installPaths";
 
 static const std::string kTARGET_CROSS_REFERENCES_KEY = "crossReferences";
 static const std::string kLINE_NUMBER_KEY = "line";
diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx
index e835b7a..fc06fed 100644
--- a/Source/cmServerProtocol.cxx
+++ b/Source/cmServerProtocol.cxx
@@ -8,6 +8,8 @@
 #include "cmGeneratorExpression.h"
 #include "cmGeneratorTarget.h"
 #include "cmGlobalGenerator.h"
+#include "cmInstallGenerator.h"
+#include "cmInstallTargetGenerator.h"
 #include "cmLinkLineComputer.h"
 #include "cmListFileCache.h"
 #include "cmLocalGenerator.h"
@@ -30,6 +32,7 @@
 #include <functional>
 #include <limits>
 #include <map>
+#include <memory>
 #include <set>
 #include <string>
 #include <unordered_map>
@@ -252,7 +255,7 @@ bool cmServerProtocol::DoActivate(const cmServerRequest& /*request*/,
 
 std::pair<int, int> cmServerProtocol1::ProtocolVersion() const
 {
-  return std::make_pair(1, 1);
+  return std::make_pair(1, 2);
 }
 
 static void setErrorMessage(std::string* errorMessage, const std::string& text)
@@ -797,6 +800,34 @@ static Json::Value DumpTarget(cmGeneratorTarget* target,
 
   result[kFULL_NAME_KEY] = target->GetFullName(config);
 
+  if (target->Target->GetHaveInstallRule()) {
+    result[kHAS_INSTALL_RULE] = true;
+
+    Json::Value installPaths = Json::arrayValue;
+    auto targetGenerators = target->Makefile->GetInstallGenerators();
+    for (auto installGenerator : targetGenerators) {
+      auto installTargetGenerator =
+        dynamic_cast<cmInstallTargetGenerator*>(installGenerator);
+      if (installTargetGenerator != nullptr &&
+          installTargetGenerator->GetTarget()->Target == target->Target) {
+        auto dest = installTargetGenerator->GetDestination(config);
+
+        std::string installPath;
+        if (!dest.empty() && cmSystemTools::FileIsFullPath(dest.c_str())) {
+          installPath = dest;
+        } else {
+          std::string installPrefix =
+            target->Makefile->GetSafeDefinition("CMAKE_INSTALL_PREFIX");
+          installPath = installPrefix + '/' + dest;
+        }
+
+        installPaths.append(installPath);
+      }
+    }
+
+    result[kINSTALL_PATHS] = installPaths;
+  }
+
   Json::Value crossRefs = Json::objectValue;
   crossRefs[kBACKTRACE_KEY] = DumpBacktrace(target->Target->GetBacktrace());
 
@@ -933,6 +964,7 @@ static Json::Value DumpProjectList(const cmake* cm, std::string const& config)
 
     // Project structure information:
     const cmMakefile* mf = lg->GetMakefile();
+    pObj[kHAS_INSTALL_RULE] = mf->GetInstallGenerators().empty() == false;
     pObj[kSOURCE_DIRECTORY_KEY] = mf->GetCurrentSourceDirectory();
     pObj[kBUILD_DIRECTORY_KEY] = mf->GetCurrentBinaryDirectory();
     pObj[kTARGETS_KEY] = DumpTargetsList(projectIt.second, config);

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b2c6c3574e29d5076af43b4fe5a0220748a8d6ed
commit b2c6c3574e29d5076af43b4fe5a0220748a8d6ed
Author:     Isuru Fernando <isuruf at gmail.com>
AuthorDate: Mon Oct 23 19:36:23 2017 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Oct 24 11:27:08 2017 -0400

    Flang: Add partial support on Windows
    
    Add minimal changes needed to help Flang itself build on Windows using
    CMake.  Additional work will be required for full support.
    
    Issue: #17384

diff --git a/Modules/Platform/Windows-Flang-Fortran.cmake b/Modules/Platform/Windows-Flang-Fortran.cmake
new file mode 100644
index 0000000..9f20e73
--- /dev/null
+++ b/Modules/Platform/Windows-Flang-Fortran.cmake
@@ -0,0 +1,2 @@
+include(Platform/Windows-MSVC)
+__windows_compiler_msvc(Fortran)

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

Summary of changes:
 Help/manual/cmake-server.7.rst               |    6 +++++
 Modules/Platform/Windows-Flang-Fortran.cmake |    2 ++
 Source/cmMakefile.h                          |    4 +++
 Source/cmServerDictionary.h                  |    2 ++
 Source/cmServerProtocol.cxx                  |   34 +++++++++++++++++++++++++-
 5 files changed, 47 insertions(+), 1 deletion(-)
 create mode 100644 Modules/Platform/Windows-Flang-Fortran.cmake


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list