[Cmake-commits] CMake branch, next, updated. v3.8.0-rc4-679-gdf2005e

Kitware Robot kwrobot at kitware.com
Tue Apr 4 13:05:02 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  df2005eecd9bae8395c6d3c65c409d8d1bab44d0 (commit)
       via  01826231f8916057ad06555a3677c1806a2fb3be (commit)
       via  38fd5866c04d734ea78a4327de7a9ce08b6b8341 (commit)
      from  10cbfde1c137f493fb15eaa53cdeeae55e25ce38 (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=df2005eecd9bae8395c6d3c65c409d8d1bab44d0
commit df2005eecd9bae8395c6d3c65c409d8d1bab44d0
Merge: 10cbfde 0182623
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Apr 4 16:59:24 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Tue Apr 4 12:59:39 2017 -0400

    Stage topic 'prop-is-multi-config'
    
    Topic-id: 23452
    Topic-url: https://gitlab.kitware.com/cmake/cmake/merge_requests/657


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=01826231f8916057ad06555a3677c1806a2fb3be
commit 01826231f8916057ad06555a3677c1806a2fb3be
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Apr 3 16:14:09 2017 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Apr 4 09:49:01 2017 -0400

    Tests: Add case for GENERATOR_IS_MULTI_CONFIG

diff --git a/Tests/RunCMake/get_property/IsMultiConfig-stdout.txt b/Tests/RunCMake/get_property/IsMultiConfig-stdout.txt
new file mode 100644
index 0000000..9808674
--- /dev/null
+++ b/Tests/RunCMake/get_property/IsMultiConfig-stdout.txt
@@ -0,0 +1 @@
+-- GENERATOR_IS_MULTI_CONFIG=1
diff --git a/Tests/RunCMake/get_property/IsMultiConfig.cmake b/Tests/RunCMake/get_property/IsMultiConfig.cmake
new file mode 100644
index 0000000..64d5ff6
--- /dev/null
+++ b/Tests/RunCMake/get_property/IsMultiConfig.cmake
@@ -0,0 +1,2 @@
+get_property(is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
+message(STATUS "GENERATOR_IS_MULTI_CONFIG=${is_multi_config}")
diff --git a/Tests/RunCMake/get_property/NotMultiConfig-stdout.txt b/Tests/RunCMake/get_property/NotMultiConfig-stdout.txt
new file mode 100644
index 0000000..8e0f895
--- /dev/null
+++ b/Tests/RunCMake/get_property/NotMultiConfig-stdout.txt
@@ -0,0 +1 @@
+-- GENERATOR_IS_MULTI_CONFIG=0
diff --git a/Tests/RunCMake/get_property/NotMultiConfig.cmake b/Tests/RunCMake/get_property/NotMultiConfig.cmake
new file mode 100644
index 0000000..59172d5
--- /dev/null
+++ b/Tests/RunCMake/get_property/NotMultiConfig.cmake
@@ -0,0 +1 @@
+include(IsMultiConfig.cmake)
diff --git a/Tests/RunCMake/get_property/RunCMakeTest.cmake b/Tests/RunCMake/get_property/RunCMakeTest.cmake
index 00eef34..017990f 100644
--- a/Tests/RunCMake/get_property/RunCMakeTest.cmake
+++ b/Tests/RunCMake/get_property/RunCMakeTest.cmake
@@ -22,3 +22,9 @@ run_cmake(NoTarget)
 run_cmake(NoSource)
 run_cmake(NoProperty)
 run_cmake(NoCache)
+
+if(RunCMake_GENERATOR MATCHES "Visual Studio|Xcode")
+  run_cmake(IsMultiConfig)
+else()
+  run_cmake(NotMultiConfig)
+endif()

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=38fd5866c04d734ea78a4327de7a9ce08b6b8341
commit 38fd5866c04d734ea78a4327de7a9ce08b6b8341
Author:     Bastien Schatt <bastien.schatt at magestik.fr>
AuthorDate: Mon Apr 3 18:47:32 2017 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Apr 4 09:49:00 2017 -0400

    Add GENERATOR_IS_MULTI_CONFIG global property
    
    Fixes: #16768

diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst
index 072d7c5..27c75dc 100644
--- a/Help/manual/cmake-properties.7.rst
+++ b/Help/manual/cmake-properties.7.rst
@@ -31,6 +31,7 @@ Properties of Global Scope
    /prop_gbl/FIND_LIBRARY_USE_LIB64_PATHS
    /prop_gbl/FIND_LIBRARY_USE_LIBX32_PATHS
    /prop_gbl/FIND_LIBRARY_USE_OPENBSD_VERSIONING
+   /prop_gbl/GENERATOR_IS_MULTI_CONFIG
    /prop_gbl/GLOBAL_DEPENDS_DEBUG_MODE
    /prop_gbl/GLOBAL_DEPENDS_NO_CYCLES
    /prop_gbl/IN_TRY_COMPILE
diff --git a/Help/prop_gbl/GENERATOR_IS_MULTI_CONFIG.rst b/Help/prop_gbl/GENERATOR_IS_MULTI_CONFIG.rst
new file mode 100644
index 0000000..b8ec8a6
--- /dev/null
+++ b/Help/prop_gbl/GENERATOR_IS_MULTI_CONFIG.rst
@@ -0,0 +1,9 @@
+GENERATOR_IS_MULTI_CONFIG
+-------------------------
+
+Read-only property that is true on multi-configuration generators.
+
+True when using a multi-configuration generator
+(such as :ref:`Visual Studio Generators` or :generator:`Xcode`).
+Multi-config generators use :variable:`CMAKE_CONFIGURATION_TYPES`
+as the set of configurations and ignore :variable:`CMAKE_BUILD_TYPE`.
diff --git a/Help/release/dev/prop-is-multi-config.rst b/Help/release/dev/prop-is-multi-config.rst
new file mode 100644
index 0000000..52de563
--- /dev/null
+++ b/Help/release/dev/prop-is-multi-config.rst
@@ -0,0 +1,6 @@
+prop-is-multi-config
+--------------------
+
+* A :prop_gbl:`GENERATOR_IS_MULTI_CONFIG` global property was
+  added to determine whether the current generator is a multi-configuration
+  generator (such as :ref:`Visual Studio Generators` or :generator:`Xcode`).
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 851290a..ce83e2e 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -96,6 +96,7 @@ cmGlobalGenerator::cmGlobalGenerator(cmake* cm)
   this->ConfigureDoneCMP0026AndCMP0024 = false;
   this->FirstTimeProgress = 0.0f;
 
+  cm->GetState()->SetIsGeneratorMultiConfig(false);
   cm->GetState()->SetMinGWMake(false);
   cm->GetState()->SetMSYSShell(false);
   cm->GetState()->SetNMake(false);
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index eb92b83..6d16881 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -20,6 +20,7 @@
 cmGlobalVisualStudioGenerator::cmGlobalVisualStudioGenerator(cmake* cm)
   : cmGlobalGenerator(cm)
 {
+  cm->GetState()->SetIsGeneratorMultiConfig(true);
   cm->GetState()->SetWindowsShell(true);
   cm->GetState()->SetWindowsVSIDE(true);
 }
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 416af14..febe95d 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -151,6 +151,8 @@ cmGlobalXCodeGenerator::cmGlobalXCodeGenerator(cmake* cm,
   this->CurrentMakefile = 0;
   this->CurrentLocalGenerator = 0;
   this->XcodeBuildCommandInitialized = false;
+
+  cm->GetState()->SetIsGeneratorMultiConfig(true);
 }
 
 cmGlobalGeneratorFactory* cmGlobalXCodeGenerator::NewFactory()
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index 18d5ea1..0f49731 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -20,6 +20,7 @@
 
 cmState::cmState()
   : IsInTryCompile(false)
+  , IsGeneratorMultiConfig(false)
   , WindowsShell(false)
   , WindowsVSIDE(false)
   , WatcomWMake(false)
@@ -364,6 +365,16 @@ void cmState::SetIsInTryCompile(bool b)
   this->IsInTryCompile = b;
 }
 
+bool cmState::GetIsGeneratorMultiConfig() const
+{
+  return this->IsGeneratorMultiConfig;
+}
+
+void cmState::SetIsGeneratorMultiConfig(bool b)
+{
+  this->IsGeneratorMultiConfig = b;
+}
+
 void cmState::RenameCommand(std::string const& oldName,
                             std::string const& newName)
 {
@@ -481,6 +492,9 @@ const char* cmState::GetGlobalProperty(const std::string& prop)
   } else if (prop == "IN_TRY_COMPILE") {
     this->SetGlobalProperty("IN_TRY_COMPILE",
                             this->IsInTryCompile ? "1" : "0");
+  } else if (prop == "GENERATOR_IS_MULTI_CONFIG") {
+    this->SetGlobalProperty("GENERATOR_IS_MULTI_CONFIG",
+                            this->IsGeneratorMultiConfig ? "1" : "0");
   } else if (prop == "ENABLED_LANGUAGES") {
     std::string langs;
     langs = cmJoin(this->EnabledLanguages, ";");
diff --git a/Source/cmState.h b/Source/cmState.h
index 41ffcdc..5659023 100644
--- a/Source/cmState.h
+++ b/Source/cmState.h
@@ -116,6 +116,9 @@ public:
   bool GetIsInTryCompile() const;
   void SetIsInTryCompile(bool b);
 
+  bool GetIsGeneratorMultiConfig() const;
+  void SetIsGeneratorMultiConfig(bool b);
+
   cmCommand* GetCommand(std::string const& name) const;
   void AddCommand(cmCommand* command);
   void RemoveUnscriptableCommands();
@@ -174,6 +177,7 @@ private:
   std::string SourceDirectory;
   std::string BinaryDirectory;
   bool IsInTryCompile;
+  bool IsGeneratorMultiConfig;
   bool WindowsShell;
   bool WindowsVSIDE;
   bool WatcomWMake;

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

Summary of changes:
 Help/manual/cmake-properties.7.rst                    |    1 +
 Help/prop_gbl/GENERATOR_IS_MULTI_CONFIG.rst           |    9 +++++++++
 Help/release/dev/prop-is-multi-config.rst             |    6 ++++++
 Source/cmGlobalGenerator.cxx                          |    1 +
 Source/cmGlobalVisualStudioGenerator.cxx              |    1 +
 Source/cmGlobalXCodeGenerator.cxx                     |    2 ++
 Source/cmState.cxx                                    |   14 ++++++++++++++
 Source/cmState.h                                      |    4 ++++
 Tests/RunCMake/get_property/IsMultiConfig-stdout.txt  |    1 +
 Tests/RunCMake/get_property/IsMultiConfig.cmake       |    2 ++
 Tests/RunCMake/get_property/NotMultiConfig-stdout.txt |    1 +
 Tests/RunCMake/get_property/NotMultiConfig.cmake      |    1 +
 Tests/RunCMake/get_property/RunCMakeTest.cmake        |    6 ++++++
 13 files changed, 49 insertions(+)
 create mode 100644 Help/prop_gbl/GENERATOR_IS_MULTI_CONFIG.rst
 create mode 100644 Help/release/dev/prop-is-multi-config.rst
 create mode 100644 Tests/RunCMake/get_property/IsMultiConfig-stdout.txt
 create mode 100644 Tests/RunCMake/get_property/IsMultiConfig.cmake
 create mode 100644 Tests/RunCMake/get_property/NotMultiConfig-stdout.txt
 create mode 100644 Tests/RunCMake/get_property/NotMultiConfig.cmake


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list