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  b3aaf1b55addfb1b8593f02df83f1fa6f604f141 (commit)
       via  f8e54f1d065cb2ad341ab45945cc4f506cc57572 (commit)
       via  c216e80308c21c3c17b964f50f9f615121783ce6 (commit)
       via  227de0b95d6fd12e47da502ce34e8aea6d57cc43 (commit)
       via  4cd815f0b314197ddabea94017e0ce8b15836c17 (commit)
      from  764b7ec91c9c0121eab8dca3216eb825e3de3a8f (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=b3aaf1b55addfb1b8593f02df83f1fa6f604f141
commit b3aaf1b55addfb1b8593f02df83f1fa6f604f141
Merge: f8e54f1 227de0b
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Wed Apr 5 19:53:54 2017 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Wed Apr 5 15:53:59 2017 -0400

    Stage topic 'include_external_msproject-map-config'
    
    Topic-id: 23504
    Topic-url: https://gitlab.kitware.com/cmake/cmake/merge_requests/669


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f8e54f1d065cb2ad341ab45945cc4f506cc57572
commit f8e54f1d065cb2ad341ab45945cc4f506cc57572
Merge: 764b7ec c216e80
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Wed Apr 5 19:53:18 2017 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Wed Apr 5 15:53:30 2017 -0400

    Stage topic 'bindexplib-format'
    
    Topic-id: 23513
    Topic-url: https://gitlab.kitware.com/cmake/cmake/merge_requests/670


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c216e80308c21c3c17b964f50f9f615121783ce6
commit c216e80308c21c3c17b964f50f9f615121783ce6
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Wed Apr 5 15:51:38 2017 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Wed Apr 5 15:51:38 2017 -0400

    bindexplib: Run clang-format on header file

diff --git a/Source/bindexplib.h b/Source/bindexplib.h
index 7f0615f..51fe49d 100644
--- a/Source/bindexplib.h
+++ b/Source/bindexplib.h
@@ -16,6 +16,7 @@ public:
   bool AddDefinitionFile(const char* filename);
   bool AddObjectFile(const char* filename);
   void WriteFile(FILE* file);
+
 private:
   std::set<std::string> Symbols;
   std::set<std::string> DataSymbols;

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=227de0b95d6fd12e47da502ce34e8aea6d57cc43
commit 227de0b95d6fd12e47da502ce34e8aea6d57cc43
Author:     Beeble <bee...@users.noreply.github.com>
AuthorDate: Tue Apr 4 21:13:35 2017 +0200
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Wed Apr 5 13:44:03 2017 -0400

    include_external_msproject: Honor MAP_IMPORTED_CONFIG_<CONFIG>
    
    This allows projects added via `include_external_msproject` to compile
    the preferred configuration despite different naming conventions.

diff --git a/Help/command/include_external_msproject.rst 
b/Help/command/include_external_msproject.rst
index 18a2b50..335282a 100644
--- a/Help/command/include_external_msproject.rst
+++ b/Help/command/include_external_msproject.rst
@@ -20,3 +20,7 @@ command to make things depend on the external project.
 specify the type of project, id (GUID) of the project and the name of
 the target platform.  This is useful for projects requiring values
 other than the default (e.g.  WIX projects).
+
+If the imported project has different configuration names than the
+current project, set the :prop_tgt:`MAP_IMPORTED_CONFIG_<CONFIG>`
+target property to specify the mapping.
diff --git a/Help/release/dev/include_external_msproject-map-config.rst 
b/Help/release/dev/include_external_msproject-map-config.rst
new file mode 100644
index 0000000..d5f7a7f
--- /dev/null
+++ b/Help/release/dev/include_external_msproject-map-config.rst
@@ -0,0 +1,6 @@
+include_external_msproject-map-config
+-------------------------------------
+
+* The :command:`include_external_msproject` command learned to use
+  the :prop_tgt:`MAP_IMPORTED_CONFIG_<CONFIG>` target property
+  to map current configurations to the external configurations.
diff --git a/Source/cmGlobalVisualStudio71Generator.cxx 
b/Source/cmGlobalVisualStudio71Generator.cxx
index 05aec52..3f8d381 100644
--- a/Source/cmGlobalVisualStudio71Generator.cxx
+++ b/Source/cmGlobalVisualStudio71Generator.cxx
@@ -259,13 +259,18 @@ void 
cmGlobalVisualStudio71Generator::WriteProjectConfigurations(
   std::string guid = this->GetGUID(name);
   for (std::vector<std::string>::const_iterator i = configs.begin();
        i != configs.end(); ++i) {
-    fout << "\t\t{" << guid << "}." << *i << ".ActiveCfg = " << *i << "|"
-         << platformName << std::endl;
+    const char* dstConfig = target.GetProperty("MAP_IMPORTED_CONFIG_" +
+                                               cmSystemTools::UpperCase(*i));
+    if (dstConfig == CM_NULLPTR) {
+      dstConfig = i->c_str();
+    }
+    fout << "\t\t{" << guid << "}." << *i << ".ActiveCfg = " << dstConfig
+         << "|" << platformName << std::endl;
     std::set<std::string>::const_iterator ci =
       configsPartOfDefaultBuild.find(*i);
     if (!(ci == configsPartOfDefaultBuild.end())) {
-      fout << "\t\t{" << guid << "}." << *i << ".Build.0 = " << *i << "|"
-           << platformName << std::endl;
+      fout << "\t\t{" << guid << "}." << *i << ".Build.0 = " << dstConfig
+           << "|" << platformName << std::endl;
     }
   }
 }
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx 
b/Source/cmGlobalVisualStudio8Generator.cxx
index 13a9ab3..634db7f 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -361,8 +361,13 @@ void 
cmGlobalVisualStudio8Generator::WriteProjectConfigurations(
   std::string guid = this->GetGUID(name);
   for (std::vector<std::string>::const_iterator i = configs.begin();
        i != configs.end(); ++i) {
+    const char* dstConfig = target.GetProperty("MAP_IMPORTED_CONFIG_" +
+                                               cmSystemTools::UpperCase(*i));
+    if (dstConfig == CM_NULLPTR) {
+      dstConfig = i->c_str();
+    }
     fout << "\t\t{" << guid << "}." << *i << "|" << this->GetPlatformName()
-         << ".ActiveCfg = " << *i << "|"
+         << ".ActiveCfg = " << dstConfig << "|"
          << (!platformMapping.empty() ? platformMapping
                                       : this->GetPlatformName())
          << "\n";
@@ -370,14 +375,14 @@ void 
cmGlobalVisualStudio8Generator::WriteProjectConfigurations(
       configsPartOfDefaultBuild.find(*i);
     if (!(ci == configsPartOfDefaultBuild.end())) {
       fout << "\t\t{" << guid << "}." << *i << "|" << this->GetPlatformName()
-           << ".Build.0 = " << *i << "|"
+           << ".Build.0 = " << dstConfig << "|"
            << (!platformMapping.empty() ? platformMapping
                                         : this->GetPlatformName())
            << "\n";
     }
     if (this->NeedsDeploy(target.GetType())) {
       fout << "\t\t{" << guid << "}." << *i << "|" << this->GetPlatformName()
-           << ".Deploy.0 = " << *i << "|"
+           << ".Deploy.0 = " << dstConfig << "|"
            << (!platformMapping.empty() ? platformMapping
                                         : this->GetPlatformName())
            << "\n";
diff --git a/Tests/RunCMake/include_external_msproject/CustomConfig-check.cmake 
b/Tests/RunCMake/include_external_msproject/CustomConfig-check.cmake
new file mode 100644
index 0000000..1a940b8
--- /dev/null
+++ b/Tests/RunCMake/include_external_msproject/CustomConfig-check.cmake
@@ -0,0 +1 @@
+check_project(CustomConfig external "aaa-bbb-ccc-000" "" "" "Custom - Release")
diff --git a/Tests/RunCMake/include_external_msproject/CustomConfig.cmake 
b/Tests/RunCMake/include_external_msproject/CustomConfig.cmake
new file mode 100644
index 0000000..1f935cd
--- /dev/null
+++ b/Tests/RunCMake/include_external_msproject/CustomConfig.cmake
@@ -0,0 +1,3 @@
+include_external_msproject(external external.project
+                           GUID aaa-bbb-ccc-000)
+set_target_properties(external PROPERTIES MAP_IMPORTED_CONFIG_RELEASE "Custom 
- Release")
diff --git a/Tests/RunCMake/include_external_msproject/CustomGuid-check.cmake 
b/Tests/RunCMake/include_external_msproject/CustomGuid-check.cmake
index 68dec4c..3747934 100644
--- a/Tests/RunCMake/include_external_msproject/CustomGuid-check.cmake
+++ b/Tests/RunCMake/include_external_msproject/CustomGuid-check.cmake
@@ -1 +1 @@
-check_project(CustomGuid external "aaa-bbb-ccc-000" "" "")
+check_project(CustomGuid external "aaa-bbb-ccc-000" "" "" "")
diff --git 
a/Tests/RunCMake/include_external_msproject/CustomGuidTypePlatform-check.cmake 
b/Tests/RunCMake/include_external_msproject/CustomGuidTypePlatform-check.cmake
index 614712e..0b2ac1d 100644
--- 
a/Tests/RunCMake/include_external_msproject/CustomGuidTypePlatform-check.cmake
+++ 
b/Tests/RunCMake/include_external_msproject/CustomGuidTypePlatform-check.cmake
@@ -1 +1 @@
-check_project(CustomGuidTypePlatform external "aaa-bbb-ccc-111" 
"aaa-bbb-ccc-ddd-eee" "Custom Platform")
+check_project(CustomGuidTypePlatform external "aaa-bbb-ccc-111" 
"aaa-bbb-ccc-ddd-eee" "Custom Platform" "")
diff --git 
a/Tests/RunCMake/include_external_msproject/CustomTypePlatform-check.cmake 
b/Tests/RunCMake/include_external_msproject/CustomTypePlatform-check.cmake
index 054eeb0..c431b03 100644
--- a/Tests/RunCMake/include_external_msproject/CustomTypePlatform-check.cmake
+++ b/Tests/RunCMake/include_external_msproject/CustomTypePlatform-check.cmake
@@ -1 +1 @@
-check_project(CustomTypePlatform external "" "aaa-bbb-ccc-ddd-eee" "Custom 
Platform")
+check_project(CustomTypePlatform external "" "aaa-bbb-ccc-ddd-eee" "Custom 
Platform" "")
diff --git a/Tests/RunCMake/include_external_msproject/RunCMakeTest.cmake 
b/Tests/RunCMake/include_external_msproject/RunCMakeTest.cmake
index 90710f9..47dac34 100644
--- a/Tests/RunCMake/include_external_msproject/RunCMakeTest.cmake
+++ b/Tests/RunCMake/include_external_msproject/RunCMakeTest.cmake
@@ -4,3 +4,4 @@ include(${CMAKE_CURRENT_LIST_DIR}/check_utils.cmake)
 run_cmake(CustomGuid)
 run_cmake(CustomTypePlatform)
 run_cmake(CustomGuidTypePlatform)
+run_cmake(CustomConfig)
diff --git a/Tests/RunCMake/include_external_msproject/check_utils.cmake 
b/Tests/RunCMake/include_external_msproject/check_utils.cmake
index 5dd92f9..e9e9cac 100644
--- a/Tests/RunCMake/include_external_msproject/check_utils.cmake
+++ b/Tests/RunCMake/include_external_msproject/check_utils.cmake
@@ -71,8 +71,24 @@ function(check_custom_platform TARGET_FILE PROJECT_NAME 
PLATFORM_NAME RESULT)
   set(${RESULT} ${IS_FOUND} PARENT_SCOPE)
 endfunction()
 
+# Search project's build configuration line by project name and target 
configuration name.
+# Returns TRUE if found and FALSE otherwise
+function(check_custom_configuration TARGET_FILE PROJECT_NAME SLN_CONFIG 
DST_CONFIG RESULT)
+  set(${RESULT} "FALSE" PARENT_SCOPE)
+  # extract project guid
+  parse_project_section(${TARGET_FILE} ${PROJECT_NAME})
+  if(NOT IS_FOUND)
+    return()
+  endif()
+
+  set(REG_EXP "^(\t)*\\{${FOUND_GUID}\\}\\.${SLN_CONFIG}[^ ]*\\.ActiveCfg = 
${DST_CONFIG}\\|.*$")
+  check_line_exists(${TARGET_FILE} REG_EXP)
+
+  set(${RESULT} ${IS_FOUND} PARENT_SCOPE)
+endfunction()
+
 # RunCMake test check helper
-function(check_project test name guid type platform)
+function(check_project test name guid type platform 
imported_release_config_name)
   set(sln "${RunCMake_TEST_BINARY_DIR}/${test}.sln")
   set(sep "")
   set(failed "")
@@ -88,6 +104,9 @@ function(check_project test name guid type platform)
       set(platform "Win32")
     endif()
   endif()
+  if(NOT imported_release_config_name)
+    set(imported_release_config_name "Release")
+  endif()
   if(guid)
     check_project_guid("${sln}" "${name}" "${guid}" passed_guid)
     if(NOT passed_guid)
@@ -107,5 +126,11 @@ function(check_project test name guid type platform)
     string(APPEND failed "${sep}${name} solution has no project with expected 
PLATFORM=${platform}")
     set(sep "\n")
   endif()
+  check_custom_configuration("${sln}" "${name}" "Release" 
"${imported_release_config_name}" passed_configuration)
+  if(NOT passed_configuration)
+    string(APPEND failed "${sep}${name} solution has no project with expected 
CONFIG=${imported_release_config_name}")
+    set(sep "\n")
+  endif()
+
   set(RunCMake_TEST_FAILED "${failed}" PARENT_SCOPE)
 endfunction()

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4cd815f0b314197ddabea94017e0ce8b15836c17
commit 4cd815f0b314197ddabea94017e0ce8b15836c17
Author:     Beeble <bee...@users.noreply.github.com>
AuthorDate: Tue Apr 4 21:12:26 2017 +0200
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Wed Apr 5 13:37:45 2017 -0400

    VS: Pass whole target to WriteProjectConfigurations

diff --git a/Source/cmGlobalVisualStudio71Generator.cxx 
b/Source/cmGlobalVisualStudio71Generator.cxx
index 55a788f..05aec52 100644
--- a/Source/cmGlobalVisualStudio71Generator.cxx
+++ b/Source/cmGlobalVisualStudio71Generator.cxx
@@ -249,7 +249,7 @@ void cmGlobalVisualStudio71Generator::WriteExternalProject(
 // Write a dsp file into the SLN file, Note, that dependencies from
 // executables to the libraries it uses are also done here
 void cmGlobalVisualStudio71Generator::WriteProjectConfigurations(
-  std::ostream& fout, const std::string& name, cmStateEnums::TargetType,
+  std::ostream& fout, const std::string& name, cmGeneratorTarget const& target,
   std::vector<std::string> const& configs,
   const std::set<std::string>& configsPartOfDefaultBuild,
   std::string const& platformMapping)
diff --git a/Source/cmGlobalVisualStudio71Generator.h 
b/Source/cmGlobalVisualStudio71Generator.h
index 9953047..c65a84a 100644
--- a/Source/cmGlobalVisualStudio71Generator.h
+++ b/Source/cmGlobalVisualStudio71Generator.h
@@ -56,8 +56,8 @@ protected:
                                    const char* path,
                                    cmGeneratorTarget const* t);
   virtual void WriteProjectConfigurations(
-    std::ostream& fout, const std::string& name, cmStateEnums::TargetType type,
-    std::vector<std::string> const& configs,
+    std::ostream& fout, const std::string& name,
+    cmGeneratorTarget const& target, std::vector<std::string> const& configs,
     const std::set<std::string>& configsPartOfDefaultBuild,
     const std::string& platformMapping = "");
   virtual void WriteExternalProject(std::ostream& fout,
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx 
b/Source/cmGlobalVisualStudio7Generator.cxx
index e7fb203..2d0abf9 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -356,16 +356,16 @@ void 
cmGlobalVisualStudio7Generator::WriteTargetConfigurations(
     if (expath) {
       std::set<std::string> allConfigurations(configs.begin(), configs.end());
       const char* mapping = target->GetProperty("VS_PLATFORM_MAPPING");
-      this->WriteProjectConfigurations(
-        fout, target->GetName().c_str(), target->GetType(), configs,
-        allConfigurations, mapping ? mapping : "");
+      this->WriteProjectConfigurations(fout, target->GetName().c_str(),
+                                       *target, configs, allConfigurations,
+                                       mapping ? mapping : "");
     } else {
       const std::set<std::string>& configsPartOfDefaultBuild =
         this->IsPartOfDefaultBuild(configs, projectTargets, target);
       const char* vcprojName = target->GetProperty("GENERATOR_FILE_NAME");
       if (vcprojName) {
-        this->WriteProjectConfigurations(fout, vcprojName, target->GetType(),
-                                         configs, configsPartOfDefaultBuild);
+        this->WriteProjectConfigurations(fout, vcprojName, *target, configs,
+                                         configsPartOfDefaultBuild);
       }
     }
   }
diff --git a/Source/cmGlobalVisualStudio7Generator.h 
b/Source/cmGlobalVisualStudio7Generator.h
index 1f96cc6..32a8d60 100644
--- a/Source/cmGlobalVisualStudio7Generator.h
+++ b/Source/cmGlobalVisualStudio7Generator.h
@@ -121,8 +121,8 @@ protected:
                                    const char* path,
                                    cmGeneratorTarget const* t) = 0;
   virtual void WriteProjectConfigurations(
-    std::ostream& fout, const std::string& name, cmStateEnums::TargetType type,
-    std::vector<std::string> const& configs,
+    std::ostream& fout, const std::string& name,
+    cmGeneratorTarget const& target, std::vector<std::string> const& configs,
     const std::set<std::string>& configsPartOfDefaultBuild,
     const std::string& platformMapping = "") = 0;
   virtual void WriteSLNGlobalSections(std::ostream& fout,
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx 
b/Source/cmGlobalVisualStudio8Generator.cxx
index 8353a3f..13a9ab3 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -353,7 +353,7 @@ void 
cmGlobalVisualStudio8Generator::WriteSolutionConfigurations(
 }
 
 void cmGlobalVisualStudio8Generator::WriteProjectConfigurations(
-  std::ostream& fout, const std::string& name, cmStateEnums::TargetType type,
+  std::ostream& fout, const std::string& name, cmGeneratorTarget const& target,
   std::vector<std::string> const& configs,
   const std::set<std::string>& configsPartOfDefaultBuild,
   std::string const& platformMapping)
@@ -375,7 +375,7 @@ void 
cmGlobalVisualStudio8Generator::WriteProjectConfigurations(
                                         : this->GetPlatformName())
            << "\n";
     }
-    if (this->NeedsDeploy(type)) {
+    if (this->NeedsDeploy(target.GetType())) {
       fout << "\t\t{" << guid << "}." << *i << "|" << this->GetPlatformName()
            << ".Deploy.0 = " << *i << "|"
            << (!platformMapping.empty() ? platformMapping
diff --git a/Source/cmGlobalVisualStudio8Generator.h 
b/Source/cmGlobalVisualStudio8Generator.h
index 53feb47..03fa077 100644
--- a/Source/cmGlobalVisualStudio8Generator.h
+++ b/Source/cmGlobalVisualStudio8Generator.h
@@ -82,8 +82,8 @@ protected:
   virtual void WriteSolutionConfigurations(
     std::ostream& fout, std::vector<std::string> const& configs);
   virtual void WriteProjectConfigurations(
-    std::ostream& fout, const std::string& name, cmStateEnums::TargetType type,
-    std::vector<std::string> const& configs,
+    std::ostream& fout, const std::string& name,
+    cmGeneratorTarget const& target, std::vector<std::string> const& configs,
     const std::set<std::string>& configsPartOfDefaultBuild,
     const std::string& platformMapping = "");
   virtual bool ComputeTargetDepends();

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

Summary of changes:
 Help/command/include_external_msproject.rst        |    4 +++
 .../dev/include_external_msproject-map-config.rst  |    6 +++++
 Source/bindexplib.h                                |    1 +
 Source/cmGlobalVisualStudio71Generator.cxx         |   15 +++++++----
 Source/cmGlobalVisualStudio71Generator.h           |    4 +--
 Source/cmGlobalVisualStudio7Generator.cxx          |   10 ++++----
 Source/cmGlobalVisualStudio7Generator.h            |    4 +--
 Source/cmGlobalVisualStudio8Generator.cxx          |   15 +++++++----
 Source/cmGlobalVisualStudio8Generator.h            |    4 +--
 .../CustomConfig-check.cmake                       |    1 +
 .../{CustomGuid.cmake => CustomConfig.cmake}       |    1 +
 .../CustomGuid-check.cmake                         |    2 +-
 .../CustomGuidTypePlatform-check.cmake             |    2 +-
 .../CustomTypePlatform-check.cmake                 |    2 +-
 .../include_external_msproject/RunCMakeTest.cmake  |    1 +
 .../include_external_msproject/check_utils.cmake   |   27 +++++++++++++++++++-
 16 files changed, 74 insertions(+), 25 deletions(-)
 create mode 100644 Help/release/dev/include_external_msproject-map-config.rst
 create mode 100644 
Tests/RunCMake/include_external_msproject/CustomConfig-check.cmake
 copy Tests/RunCMake/include_external_msproject/{CustomGuid.cmake => 
CustomConfig.cmake} (53%)


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits

Reply via email to