[Cmake-commits] CMake branch, next, updated. v3.4.0-rc1-472-g49a71ea

Stephen Kelly steveire at gmail.com
Mon Oct 12 13:37:52 EDT 2015


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  49a71eaca1bbc813bee09ccf674e6022fa8116b6 (commit)
       via  7dac31b2292b0eac32929649cad1f32e6f0a6114 (commit)
      from  711ee928a6531f5f8323d9cbded47c78c8a9619e (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=49a71eaca1bbc813bee09ccf674e6022fa8116b6
commit 49a71eaca1bbc813bee09ccf674e6022fa8116b6
Merge: 711ee92 7dac31b
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Oct 12 13:37:51 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Oct 12 13:37:51 2015 -0400

    Merge topic 'init-state-for-subdirs' into next
    
    7dac31b2 Subdirs: Initialize from parent before configuring.


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7dac31b2292b0eac32929649cad1f32e6f0a6114
commit 7dac31b2292b0eac32929649cad1f32e6f0a6114
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Oct 12 19:34:06 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Oct 12 19:37:18 2015 +0200

    Subdirs: Initialize from parent before configuring.
    
    Add new API for the subdirs command to cmState.
    
    This fixes a regression introduced in commit f716460e (cmMakefile: Move
    invokation to initialize snapshot., 2015-10-06).

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 73d3522..3b8c188 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1682,6 +1682,7 @@ void cmMakefile::Configure()
   std::vector<cmMakefile*>::iterator sdi = subdirs.begin();
   for (; sdi != subdirs.end(); ++sdi)
     {
+    (*sdi)->StateSnapshot.InitializeFromParent_ForSubdirsCommand();
     this->ConfigureSubDirectory(*sdi);
     }
 
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index 72c7330..eb0145e 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -1366,6 +1366,11 @@ std::string cmState::Snapshot::GetProjectName() const
   return this->Position->BuildSystemDirectory->ProjectName;
 }
 
+void cmState::Snapshot::InitializeFromParent_ForSubdirsCommand()
+{
+  this->InitializeFromParent();
+}
+
 cmState::Directory::Directory(
     cmLinkedTree<BuildsystemDirectoryStateType>::iterator iter,
     const cmState::Snapshot& snapshot)
diff --git a/Source/cmState.h b/Source/cmState.h
index 2f66f7f..4f714a6 100644
--- a/Source/cmState.h
+++ b/Source/cmState.h
@@ -90,6 +90,8 @@ public:
     void SetProjectName(std::string const& name);
     std::string GetProjectName() const;
 
+    void InitializeFromParent_ForSubdirsCommand();
+
     struct StrictWeakOrder
     {
       bool operator()(const cmState::Snapshot& lhs,
diff --git a/Tests/SubDir/CMakeLists.txt b/Tests/SubDir/CMakeLists.txt
index 6822e6b..32aa93f 100644
--- a/Tests/SubDir/CMakeLists.txt
+++ b/Tests/SubDir/CMakeLists.txt
@@ -1,6 +1,10 @@
 cmake_minimum_required (VERSION 2.6)
 project(SUBDIR)
+
 subdirs(Executable EXCLUDE_FROM_ALL Examples)
+
+set(DEFINED_AFTER_SUBDIRS_COMMAND 42)
+
 write_file(${SUBDIR_BINARY_DIR}/ShouldBeHere "This file should exist.")
 #WATCOM WMAKE does not support + in the name of a file!
 if(WATCOM)
diff --git a/Tests/SubDir/Executable/CMakeLists.txt b/Tests/SubDir/Executable/CMakeLists.txt
index 77e6751..e1e5ef3 100644
--- a/Tests/SubDir/Executable/CMakeLists.txt
+++ b/Tests/SubDir/Executable/CMakeLists.txt
@@ -1 +1,5 @@
 add_executable(test test.cxx)
+
+if (NOT DEFINED_AFTER_SUBDIRS_COMMAND)
+  message(FATAL_ERROR "DEFINED_AFTER_SUBDIRS_COMMAND should be defined.")
+endif()

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

Summary of changes:
 Source/cmMakefile.cxx                  |    1 +
 Source/cmState.cxx                     |    5 +++++
 Source/cmState.h                       |    2 ++
 Tests/SubDir/CMakeLists.txt            |    4 ++++
 Tests/SubDir/Executable/CMakeLists.txt |    4 ++++
 5 files changed, 16 insertions(+)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list