[Cmake-commits] CMake branch, master, updated. v3.9.0-rc3-113-gc670d1b

Kitware Robot kwrobot at kitware.com
Fri Jun 16 09:45:05 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  c670d1b50bc08e307f021f46c96520701b075b57 (commit)
       via  97010a5b651b92f239330c1896ff91493803306c (commit)
       via  aa944c88e3e89398eaabab78297b42dea99d69d4 (commit)
       via  54c51e792e209a4eddd5d3682e8f9ef183d61d78 (commit)
       via  7b02cb299620ccce270d6c74454d04ee19dd2731 (commit)
       via  c1f15e1c79251bc3fef4bae21020eb5f15437597 (commit)
      from  6c60ec0907669b0e91bf97515e93ac7b1208d6e1 (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=c670d1b50bc08e307f021f46c96520701b075b57
commit c670d1b50bc08e307f021f46c96520701b075b57
Merge: 97010a5 54c51e7
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Jun 16 13:37:40 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri Jun 16 09:37:58 2017 -0400

    Merge topic 'fix-shadow-field-warnings'
    
    54c51e79 cmCPackDragNDropGenerator: Drop unused member
    7b02cb29 cmCommonTargetGenerator: Rename member to avoid shadowing
    c1f15e1c cmGlobalGenerator: Rename member to avoid shadowing
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !968


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=97010a5b651b92f239330c1896ff91493803306c
commit 97010a5b651b92f239330c1896ff91493803306c
Merge: 6c60ec0 aa944c8
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Jun 16 13:37:25 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri Jun 16 09:37:30 2017 -0400

    Merge topic 'doc-check-compiler-flag'
    
    aa944c88 Check*CompilerFlag: Rewrite documentation of these modules
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !972


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aa944c88e3e89398eaabab78297b42dea99d69d4
commit aa944c88e3e89398eaabab78297b42dea99d69d4
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Jun 15 13:49:35 2017 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Jun 15 13:49:35 2017 -0400

    Check*CompilerFlag: Rewrite documentation of these modules
    
    Format with modern markup.  Clarify that the setting of
    `CMAKE_REQUIRED_DEFINITIONS` is temporary.  Add a note warning
    about contamination of the checks by `CMAKE_<LANG>_FLAGS`.
    
    Issue: #16973

diff --git a/Modules/CheckCCompilerFlag.cmake b/Modules/CheckCCompilerFlag.cmake
index 1ba67fc..5a7298b 100644
--- a/Modules/CheckCCompilerFlag.cmake
+++ b/Modules/CheckCCompilerFlag.cmake
@@ -1,26 +1,36 @@
 # Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
 # file Copyright.txt or https://cmake.org/licensing for details.
 
-#.rst:
-# CheckCCompilerFlag
-# ------------------
-#
-# Check whether the C compiler supports a given flag.
-#
-# CHECK_C_COMPILER_FLAG(<flag> <var>)
-#
-# ::
-#
-#   <flag> - the compiler flag
-#   <var>  - variable to store the result
-#            Will be created as an internal cache variable.
-#
-# This internally calls the check_c_source_compiles macro and sets
-# CMAKE_REQUIRED_DEFINITIONS to <flag>.  See help for
-# CheckCSourceCompiles for a listing of variables that can otherwise
-# modify the build.  The result only tells that the compiler does not
-# give an error message when it encounters the flag.  If the flag has
-# any effect or even a specific one is beyond the scope of this module.
+#[=======================================================================[.rst:
+CheckCCompilerFlag
+------------------
+
+Check whether the C compiler supports a given flag.
+
+.. command:: check_c_compiler_flag
+
+  ::
+
+    check_c_compiler_flag(<flag> <var>)
+
+  Check that the ``<flag>`` is accepted by the compiler without
+  a diagnostic.  Stores the result in an internal cache entry
+  named ``<var>``.
+
+This command temporarily sets the ``CMAKE_REQUIRED_DEFINITIONS`` variable
+and calls the ``check_c_source_compiles`` macro from the
+:module:`CheckCSourceCompiles` module.  See documentation of that
+module for a listing of variables that can otherwise modify the build.
+
+A positive result from this check indicates only that the compiler did not
+issue a diagnostic message when given the flag.  Whether the flag has any
+effect or even a specific one is beyond the scope of this module.
+
+.. note::
+  Since the :command:`try_compile` command forwards flags from variables
+  like :variable:`CMAKE_C_FLAGS <CMAKE_<LANG>_FLAGS>`, unknown flags
+  in such variables may cause a false negative for this check.
+#]=======================================================================]
 
 include(CheckCSourceCompiles)
 include(CMakeCheckCompilerFlagCommonPatterns)
diff --git a/Modules/CheckCXXCompilerFlag.cmake b/Modules/CheckCXXCompilerFlag.cmake
index afbb231..f731b70 100644
--- a/Modules/CheckCXXCompilerFlag.cmake
+++ b/Modules/CheckCXXCompilerFlag.cmake
@@ -1,25 +1,36 @@
 # Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
 # file Copyright.txt or https://cmake.org/licensing for details.
 
-#.rst:
-# CheckCXXCompilerFlag
-# --------------------
-#
-# Check whether the CXX compiler supports a given flag.
-#
-# CHECK_CXX_COMPILER_FLAG(<flag> <var>)
-#
-# ::
-#
-#   <flag> - the compiler flag
-#   <var>  - variable to store the result
-#
-# This internally calls the check_cxx_source_compiles macro and sets
-# CMAKE_REQUIRED_DEFINITIONS to <flag>.  See help for
-# CheckCXXSourceCompiles for a listing of variables that can otherwise
-# modify the build.  The result only tells that the compiler does not
-# give an error message when it encounters the flag.  If the flag has
-# any effect or even a specific one is beyond the scope of this module.
+#[=======================================================================[.rst:
+CheckCXXCompilerFlag
+------------------------
+
+Check whether the CXX compiler supports a given flag.
+
+.. command:: check_cxx_compiler_flag
+
+  ::
+
+    check_cxx_compiler_flag(<flag> <var>)
+
+  Check that the ``<flag>`` is accepted by the compiler without
+  a diagnostic.  Stores the result in an internal cache entry
+  named ``<var>``.
+
+This command temporarily sets the ``CMAKE_REQUIRED_DEFINITIONS`` variable
+and calls the ``check_cxx_source_compiles`` macro from the
+:module:`CheckCXXSourceCompiles` module.  See documentation of that
+module for a listing of variables that can otherwise modify the build.
+
+A positive result from this check indicates only that the compiler did not
+issue a diagnostic message when given the flag.  Whether the flag has any
+effect or even a specific one is beyond the scope of this module.
+
+.. note::
+  Since the :command:`try_compile` command forwards flags from variables
+  like :variable:`CMAKE_CXX_FLAGS <CMAKE_<LANG>_FLAGS>`, unknown flags
+  in such variables may cause a false negative for this check.
+#]=======================================================================]
 
 include(CheckCXXSourceCompiles)
 include(CMakeCheckCompilerFlagCommonPatterns)
diff --git a/Modules/CheckFortranCompilerFlag.cmake b/Modules/CheckFortranCompilerFlag.cmake
index 8519fcc..8a1a8b9 100644
--- a/Modules/CheckFortranCompilerFlag.cmake
+++ b/Modules/CheckFortranCompilerFlag.cmake
@@ -1,27 +1,36 @@
 # Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
 # file Copyright.txt or https://cmake.org/licensing for details.
 
-#.rst:
-# CheckFortranCompilerFlag
-# ------------------------
-#
-# Check whether the Fortran compiler supports a given flag.
-#
-# CHECK_Fortran_COMPILER_FLAG(<flag> <var>)
-#
-# ::
-#
-#   <flag> - the compiler flag
-#   <var>  - variable to store the result
-#            Will be created as an internal cache variable.
-#
-# This internally calls the check_fortran_source_compiles macro and
-# sets CMAKE_REQUIRED_DEFINITIONS to <flag>.  See help for
-# CheckFortranSourceCompiles for a listing of variables that can
-# otherwise modify the build.  The result only tells that the compiler
-# does not give an error message when it encounters the flag.  If the
-# flag has any effect or even a specific one is beyond the scope of
-# this module.
+#[=======================================================================[.rst:
+CheckFortranCompilerFlag
+------------------------
+
+Check whether the Fortran compiler supports a given flag.
+
+.. command:: check_fortran_compiler_flag
+
+  ::
+
+    check_fortran_compiler_flag(<flag> <var>)
+
+  Check that the ``<flag>`` is accepted by the compiler without
+  a diagnostic.  Stores the result in an internal cache entry
+  named ``<var>``.
+
+This command temporarily sets the ``CMAKE_REQUIRED_DEFINITIONS`` variable
+and calls the ``check_fortran_source_compiles`` macro from the
+:module:`CheckFortranSourceCompiles` module.  See documentation of that
+module for a listing of variables that can otherwise modify the build.
+
+A positive result from this check indicates only that the compiler did not
+issue a diagnostic message when given the flag.  Whether the flag has any
+effect or even a specific one is beyond the scope of this module.
+
+.. note::
+  Since the :command:`try_compile` command forwards flags from variables
+  like :variable:`CMAKE_Fortran_FLAGS <CMAKE_<LANG>_FLAGS>`, unknown flags
+  in such variables may cause a false negative for this check.
+#]=======================================================================]
 
 include(CheckFortranSourceCompiles)
 include(CMakeCheckCompilerFlagCommonPatterns)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=54c51e792e209a4eddd5d3682e8f9ef183d61d78
commit 54c51e792e209a4eddd5d3682e8f9ef183d61d78
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Jun 14 16:34:40 2017 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Jun 14 16:34:40 2017 -0400

    cmCPackDragNDropGenerator: Drop unused member
    
    Drop the unused `InstallPrefix` member that shadows a member in a
    subclass.

diff --git a/Source/CPack/cmCPackDragNDropGenerator.h b/Source/CPack/cmCPackDragNDropGenerator.h
index 922325c..ffa9015 100644
--- a/Source/CPack/cmCPackDragNDropGenerator.h
+++ b/Source/CPack/cmCPackDragNDropGenerator.h
@@ -40,8 +40,6 @@ protected:
 
   int CreateDMG(const std::string& src_dir, const std::string& output_file);
 
-  std::string InstallPrefix;
-
 private:
   std::string slaDirectory;
   bool singleLicense;

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7b02cb299620ccce270d6c74454d04ee19dd2731
commit 7b02cb299620ccce270d6c74454d04ee19dd2731
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Jun 14 16:31:07 2017 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Jun 14 16:31:20 2017 -0400

    cmCommonTargetGenerator: Rename member to avoid shadowing
    
    Rename the `LocalGenerator` and `GlobalGenerator` members to avoid
    shadowing similar members in subclasses that use more-specific pointer
    types.

diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx
index 391d65c..6a007c8 100644
--- a/Source/cmCommonTargetGenerator.cxx
+++ b/Source/cmCommonTargetGenerator.cxx
@@ -22,10 +22,11 @@
 cmCommonTargetGenerator::cmCommonTargetGenerator(cmGeneratorTarget* gt)
   : GeneratorTarget(gt)
   , Makefile(gt->Makefile)
-  , LocalGenerator(static_cast<cmLocalCommonGenerator*>(gt->LocalGenerator))
-  , GlobalGenerator(static_cast<cmGlobalCommonGenerator*>(
+  , LocalCommonGenerator(
+      static_cast<cmLocalCommonGenerator*>(gt->LocalGenerator))
+  , GlobalCommonGenerator(static_cast<cmGlobalCommonGenerator*>(
       gt->LocalGenerator->GetGlobalGenerator()))
-  , ConfigName(LocalGenerator->GetConfigName())
+  , ConfigName(LocalCommonGenerator->GetConfigName())
 {
 }
 
@@ -62,10 +63,10 @@ void cmCommonTargetGenerator::AddModuleDefinitionFlag(
   // Append the flag and value.  Use ConvertToLinkReference to help
   // vs6's "cl -link" pass it to the linker.
   std::string flag = defFileFlag;
-  flag += this->LocalGenerator->ConvertToOutputFormat(
+  flag += this->LocalCommonGenerator->ConvertToOutputFormat(
     linkLineComputer->ConvertToLinkReference(mdi->DefFile),
     cmOutputConverter::SHELL);
-  this->LocalGenerator->AppendFlags(flags, flag);
+  this->LocalCommonGenerator->AppendFlags(flags, flag);
 }
 
 void cmCommonTargetGenerator::AppendFortranFormatFlags(
@@ -90,8 +91,8 @@ void cmCommonTargetGenerator::AppendFortranFormatFlags(
       break;
   }
   if (var) {
-    this->LocalGenerator->AppendFlags(flags,
-                                      this->Makefile->GetDefinition(var));
+    this->LocalCommonGenerator->AppendFlags(
+      flags, this->Makefile->GetDefinition(var));
   }
 }
 
@@ -101,8 +102,8 @@ std::string cmCommonTargetGenerator::GetFlags(const std::string& l)
   if (i == this->FlagsByLanguage.end()) {
     std::string flags;
 
-    this->LocalGenerator->GetTargetCompileFlags(this->GeneratorTarget,
-                                                this->ConfigName, l, flags);
+    this->LocalCommonGenerator->GetTargetCompileFlags(
+      this->GeneratorTarget, this->ConfigName, l, flags);
 
     ByLanguageMap::value_type entry(l, flags);
     i = this->FlagsByLanguage.insert(entry).first;
@@ -115,11 +116,11 @@ std::string cmCommonTargetGenerator::GetDefines(const std::string& l)
   ByLanguageMap::iterator i = this->DefinesByLanguage.find(l);
   if (i == this->DefinesByLanguage.end()) {
     std::set<std::string> defines;
-    this->LocalGenerator->GetTargetDefines(this->GeneratorTarget,
-                                           this->ConfigName, l, defines);
+    this->LocalCommonGenerator->GetTargetDefines(this->GeneratorTarget,
+                                                 this->ConfigName, l, defines);
 
     std::string definesString;
-    this->LocalGenerator->JoinDefines(defines, definesString, l);
+    this->LocalCommonGenerator->JoinDefines(defines, definesString, l);
 
     ByLanguageMap::value_type entry(l, definesString);
     i = this->DefinesByLanguage.insert(entry).first;
@@ -198,9 +199,10 @@ std::string cmCommonTargetGenerator::GetManifests()
   std::vector<std::string> manifests;
   for (std::vector<cmSourceFile const*>::iterator mi = manifest_srcs.begin();
        mi != manifest_srcs.end(); ++mi) {
-    manifests.push_back(this->LocalGenerator->ConvertToOutputFormat(
-      this->LocalGenerator->ConvertToRelativePath(
-        this->LocalGenerator->GetWorkingDirectory(), (*mi)->GetFullPath()),
+    manifests.push_back(this->LocalCommonGenerator->ConvertToOutputFormat(
+      this->LocalCommonGenerator->ConvertToRelativePath(
+        this->LocalCommonGenerator->GetWorkingDirectory(),
+        (*mi)->GetFullPath()),
       cmOutputConverter::SHELL));
   }
 
@@ -233,6 +235,6 @@ void cmCommonTargetGenerator::AppendOSXVerFlag(std::string& flags,
     // Append the flag since a non-zero version is specified.
     std::ostringstream vflag;
     vflag << flag << major << "." << minor << "." << patch;
-    this->LocalGenerator->AppendFlags(flags, vflag.str());
+    this->LocalCommonGenerator->AppendFlags(flags, vflag.str());
   }
 }
diff --git a/Source/cmCommonTargetGenerator.h b/Source/cmCommonTargetGenerator.h
index c36145f..6b0f74e 100644
--- a/Source/cmCommonTargetGenerator.h
+++ b/Source/cmCommonTargetGenerator.h
@@ -37,8 +37,8 @@ protected:
 
   cmGeneratorTarget* GeneratorTarget;
   cmMakefile* Makefile;
-  cmLocalCommonGenerator* LocalGenerator;
-  cmGlobalCommonGenerator* GlobalGenerator;
+  cmLocalCommonGenerator* LocalCommonGenerator;
+  cmGlobalCommonGenerator* GlobalCommonGenerator;
   std::string ConfigName;
 
   void AppendFortranFormatFlags(std::string& flags,

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c1f15e1c79251bc3fef4bae21020eb5f15437597
commit c1f15e1c79251bc3fef4bae21020eb5f15437597
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Jun 14 16:24:45 2017 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Jun 14 16:24:45 2017 -0400

    cmGlobalGenerator: Rename member to avoid shadowing
    
    The `CurrentMakefile` member is shadowed by a generate-time member of
    the same name in `cmGlobalXCodeGenerator`.  Rename our member to clarify
    its configure-time role and avoid the shadow.

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 0bef710..37a2759 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -90,7 +90,7 @@ cmGlobalGenerator::cmGlobalGenerator(cmake* cm)
   this->TryCompileTimeout = 0;
 
   this->ExtraGenerator = CM_NULLPTR;
-  this->CurrentMakefile = CM_NULLPTR;
+  this->CurrentConfigureMakefile = CM_NULLPTR;
   this->TryCompileOuterMakefile = CM_NULLPTR;
 
   this->ConfigureDoneCMP0026AndCMP0024 = false;
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 871178b..23c6218 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -187,9 +187,15 @@ public:
     return this->LocalGenerators;
   }
 
-  cmMakefile* GetCurrentMakefile() const { return this->CurrentMakefile; }
+  cmMakefile* GetCurrentMakefile() const
+  {
+    return this->CurrentConfigureMakefile;
+  }
 
-  void SetCurrentMakefile(cmMakefile* mf) { this->CurrentMakefile = mf; }
+  void SetCurrentMakefile(cmMakefile* mf)
+  {
+    this->CurrentConfigureMakefile = mf;
+  }
 
   void AddMakefile(cmMakefile* mf);
 
@@ -460,7 +466,7 @@ protected:
   cmake* CMakeInstance;
   std::vector<cmMakefile*> Makefiles;
   std::vector<cmLocalGenerator*> LocalGenerators;
-  cmMakefile* CurrentMakefile;
+  cmMakefile* CurrentConfigureMakefile;
   // map from project name to vector of local generators in that project
   std::map<std::string, std::vector<cmLocalGenerator*> > ProjectMap;
 

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

Summary of changes:
 Modules/CheckCCompilerFlag.cmake         |   50 +++++++++++++++++------------
 Modules/CheckCXXCompilerFlag.cmake       |   49 +++++++++++++++++-----------
 Modules/CheckFortranCompilerFlag.cmake   |   51 ++++++++++++++++++------------
 Source/CPack/cmCPackDragNDropGenerator.h |    2 --
 Source/cmCommonTargetGenerator.cxx       |   34 ++++++++++----------
 Source/cmCommonTargetGenerator.h         |    4 +--
 Source/cmGlobalGenerator.cxx             |    2 +-
 Source/cmGlobalGenerator.h               |   12 +++++--
 8 files changed, 120 insertions(+), 84 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list