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  5c10e8f6080dcf5dd66f19bb7753208604b8988c (commit)
       via  9fabee00ca8d3f15a05ac3216b755e27843f2fac (commit)
       via  aad360eb3d07fc34048f3065e2d3617fa07f2932 (commit)
       via  4a127b78fd44fd3f05eade253051b9e56a1082fc (commit)
      from  e769e61f992ba0c0028e28bdf7531f495a625925 (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=5c10e8f6080dcf5dd66f19bb7753208604b8988c
commit 5c10e8f6080dcf5dd66f19bb7753208604b8988c
Merge: 9fabee0 aad360e
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Tue Apr 10 15:32:44 2018 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Tue Apr 10 11:32:56 2018 -0400

    Merge topic 'fix-crash-trace-exp-uninit-vars'
    
    aad360eb3d Fix crash with --trace-expand --warn-uninitialized together
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Merge-request: !1944


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9fabee00ca8d3f15a05ac3216b755e27843f2fac
commit 9fabee00ca8d3f15a05ac3216b755e27843f2fac
Merge: e769e61 4a127b7
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Tue Apr 10 15:31:25 2018 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Tue Apr 10 11:31:42 2018 -0400

    Merge topic 'doc-install-export-android'
    
    4a127b78fd Help: Fix install(EXPORT_ANDROID_MK) mode documentation
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Merge-request: !1943


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aad360eb3d07fc34048f3065e2d3617fa07f2932
commit aad360eb3d07fc34048f3065e2d3617fa07f2932
Author:     R2RT <artur....@gmail.com>
AuthorDate: Sun Apr 8 22:56:44 2018 +0200
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Mon Apr 9 11:59:07 2018 -0400

    Fix crash with --trace-expand --warn-uninitialized together
    
    Some code paths in `ExpandVariablesInString{New,Old}` were not checking
    the `filename` parameter for a null pointer, but this can happen when
    using the above flags together.  Add the checks and a test case.
    
    Fixes: #17896

diff --git a/Source/cmCommandArgumentParserHelper.cxx 
b/Source/cmCommandArgumentParserHelper.cxx
index bf314bd..ccb4f88 100644
--- a/Source/cmCommandArgumentParserHelper.cxx
+++ b/Source/cmCommandArgumentParserHelper.cxx
@@ -101,10 +101,11 @@ const char* 
cmCommandArgumentParserHelper::ExpandVariable(const char* var)
     // not been "cleared"/initialized with a set(foo ) call
     if (this->WarnUninitialized && !this->Makefile->VariableInitialized(var)) {
       if (this->CheckSystemVars ||
-          cmSystemTools::IsSubDirectory(this->FileName,
-                                        this->Makefile->GetHomeDirectory()) ||
-          cmSystemTools::IsSubDirectory(
-            this->FileName, this->Makefile->GetHomeOutputDirectory())) {
+          (this->FileName &&
+           (cmSystemTools::IsSubDirectory(
+              this->FileName, this->Makefile->GetHomeDirectory()) ||
+            cmSystemTools::IsSubDirectory(
+              this->FileName, this->Makefile->GetHomeOutputDirectory())))) {
         std::ostringstream msg;
         msg << "uninitialized variable \'" << var << "\'";
         this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, msg.str());
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index b468208..71359a2 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2679,10 +2679,11 @@ cmake::MessageType 
cmMakefile::ExpandVariablesInStringNew(
             if (this->GetCMakeInstance()->GetWarnUninitialized() &&
                 !this->VariableInitialized(lookup)) {
               if (this->CheckSystemVars ||
-                  cmSystemTools::IsSubDirectory(filename,
-                                                this->GetHomeDirectory()) ||
-                  cmSystemTools::IsSubDirectory(
-                    filename, this->GetHomeOutputDirectory())) {
+                  (filename &&
+                   (cmSystemTools::IsSubDirectory(filename,
+                                                  this->GetHomeDirectory()) ||
+                    cmSystemTools::IsSubDirectory(
+                      filename, this->GetHomeOutputDirectory())))) {
                 std::ostringstream msg;
                 msg << "uninitialized variable \'" << lookup << "\'";
                 this->IssueMessage(cmake::AUTHOR_WARNING, msg.str());
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake 
b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
index 55eac5e..120a472 100644
--- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
@@ -294,6 +294,10 @@ set(RunCMake_TEST_OPTIONS --trace-expand)
 run_cmake(trace-expand)
 unset(RunCMake_TEST_OPTIONS)
 
+set(RunCMake_TEST_OPTIONS --trace-expand --warn-uninitialized)
+run_cmake(trace-expand-warn-uninitialized)
+unset(RunCMake_TEST_OPTIONS)
+
 set(RunCMake_TEST_OPTIONS --trace-source=trace-only-this-file.cmake)
 run_cmake(trace-source)
 unset(RunCMake_TEST_OPTIONS)
diff --git 
a/Tests/RunCMake/CommandLine/trace-expand-warn-uninitialized-stderr.txt 
b/Tests/RunCMake/CommandLine/trace-expand-warn-uninitialized-stderr.txt
new file mode 100644
index 0000000..74429b6
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/trace-expand-warn-uninitialized-stderr.txt
@@ -0,0 +1,2 @@
+^.*/Tests/RunCMake/CommandLine/CMakeLists.txt\(1\):  
cmake_minimum_required\(VERSION 3.0 \)
+.*/Tests/RunCMake/CommandLine/CMakeLists.txt\(2\):  
project\(trace-expand-warn-uninitialized NONE \)
diff --git a/Tests/RunCMake/CommandLine/trace-expand-warn-uninitialized.cmake 
b/Tests/RunCMake/CommandLine/trace-expand-warn-uninitialized.cmake
new file mode 100644
index 0000000..ec3e4d4
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/trace-expand-warn-uninitialized.cmake
@@ -0,0 +1,4 @@
+cmake_policy(SET CMP0053 OLD)
+message(STATUS "'${uninitialized_variable}'")
+cmake_policy(SET CMP0053 NEW)
+message(STATUS "'${uninitialized_variable}'")

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4a127b78fd44fd3f05eade253051b9e56a1082fc
commit 4a127b78fd44fd3f05eade253051b9e56a1082fc
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Mon Apr 9 10:35:31 2018 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Mon Apr 9 11:32:10 2018 -0400

    Help: Fix install(EXPORT_ANDROID_MK) mode documentation
    
    `install(EXPORT_ANDROID_MK)` is its own mode, not an option to the
    normal `install(EXPORT)` mode.
    
    While at it, also fix the prose in our documented example to match
    the code.
    
    Fixes: #17891

diff --git a/Help/command/install.rst b/Help/command/install.rst
index eb7b07c..e9c185c 100644
--- a/Help/command/install.rst
+++ b/Help/command/install.rst
@@ -339,12 +339,12 @@ Installing Exports
 
   install(EXPORT <export-name> DESTINATION <dir>
           [NAMESPACE <namespace>] [[FILE <name>.cmake]|
-          [EXPORT_ANDROID_MK <name>.mk]]
           [PERMISSIONS permissions...]
           [CONFIGURATIONS [Debug|Release|...]]
           [EXPORT_LINK_INTERFACE_LIBRARIES]
           [COMPONENT <component>]
           [EXCLUDE_FROM_ALL])
+  install(EXPORT_ANDROID_MK <export-name> DESTINATION <dir> [...])
 
 The ``EXPORT`` form generates and installs a CMake file containing code to
 import targets from the installation tree into another project.
@@ -367,8 +367,9 @@ specified that does not match that given to the targets 
associated with
 included in the export but a target to which it links is not included
 the behavior is unspecified.
 
-In addition to cmake language files, the ``EXPORT_ANDROID_MK`` option maybe
-used to specify an export to the android ndk build system.  The Android
+In addition to cmake language files, the ``EXPORT_ANDROID_MK`` mode maybe
+used to specify an export to the android ndk build system.  This mode
+accepts the same options as the normal export mode.  The Android
 NDK supports the use of prebuilt libraries, both static and shared. This
 allows cmake to build the libraries of a project and make them available
 to an ndk build system complete with transitive dependencies, include flags
@@ -385,7 +386,7 @@ and installed by the current project.  For example, the code
 
 will install the executable myexe to ``<prefix>/bin`` and code to import
 it in the file ``<prefix>/lib/myproj/myproj.cmake`` and
-``<prefix>/lib/share/ndk-modules/Android.mk``.  An outside project
+``<prefix>/share/ndk-modules/Android.mk``.  An outside project
 may load this file with the include command and reference the ``myexe``
 executable from the installation tree using the imported target name
 ``mp_myexe`` as if the target were built in its own tree.

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

Summary of changes:
 Help/command/install.rst                                      |    9 +++++----
 Source/cmCommandArgumentParserHelper.cxx                      |    9 +++++----
 Source/cmMakefile.cxx                                         |    9 +++++----
 Tests/RunCMake/CommandLine/RunCMakeTest.cmake                 |    4 ++++
 ...-stderr.txt => trace-expand-warn-uninitialized-stderr.txt} |    2 +-
 .../CommandLine/trace-expand-warn-uninitialized.cmake         |    4 ++++
 6 files changed, 24 insertions(+), 13 deletions(-)
 copy Tests/RunCMake/CommandLine/{trace-expand-stderr.txt => 
trace-expand-warn-uninitialized-stderr.txt} (80%)
 create mode 100644 
Tests/RunCMake/CommandLine/trace-expand-warn-uninitialized.cmake


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
https://cmake.org/mailman/listinfo/cmake-commits

Reply via email to