[Cmake-commits] CMake branch, next, updated. v2.8.12.1-6685-g1ddd6ba

Stephen Kelly steveire at gmail.com
Sat Jan 4 08:43:44 EST 2014


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  1ddd6ba58042b056df1506063f45985125a52ce7 (commit)
       via  8b9afc97ebe6159068e9fd4ce0b9f5422683d7e7 (commit)
      from  725f3e23bafbfad00b49ea25a1e2601e90a4589c (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 -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1ddd6ba58042b056df1506063f45985125a52ce7
commit 1ddd6ba58042b056df1506063f45985125a52ce7
Merge: 725f3e2 8b9afc9
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jan 4 08:43:38 2014 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Jan 4 08:43:38 2014 -0500

    Merge topic 'minor-cleanups' into next
    
    8b9afc9 Don't allow include() of export(EXPORT) file at configure time.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8b9afc97ebe6159068e9fd4ce0b9f5422683d7e7
commit 8b9afc97ebe6159068e9fd4ce0b9f5422683d7e7
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Dec 26 14:34:27 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Jan 4 14:42:55 2014 +0100

    Don't allow include() of export(EXPORT) file at configure time.
    
    As a new feature it does not need to participate in CMP0024.
    
    Store cmExportBuildFileGenerator instances which correspond to the
    export(EXPORT) signature in a second map which does not own the
    pointers.  This avoids the need to add cmExportBuildFileGenerator
    and dependencies to the bootstrap system.

diff --git a/Source/cmExportCommand.cxx b/Source/cmExportCommand.cxx
index b6bf870..7c97d8d 100644
--- a/Source/cmExportCommand.cxx
+++ b/Source/cmExportCommand.cxx
@@ -236,8 +236,14 @@ bool cmExportCommand
     {
     ebfg->AddConfiguration("");
     }
-
-  gg->AddBuildExportSet(ebfg);
+  if (this->ExportSet)
+    {
+    gg->AddBuildExportExportSet(ebfg);
+    }
+  else
+    {
+    gg->AddBuildExportSet(ebfg);
+    }
 
   return true;
 }
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 226a45a..eef8d6d 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -187,6 +187,13 @@ void cmGlobalGenerator::AddBuildExportSet(cmExportBuildFileGenerator* gen)
   this->BuildExportSets[gen->GetMainExportFileName()] = gen;
 }
 
+void
+cmGlobalGenerator::AddBuildExportExportSet(cmExportBuildFileGenerator* gen)
+{
+  this->BuildExportSets[gen->GetMainExportFileName()] = gen;
+  this->BuildExportExportSets[gen->GetMainExportFileName()] = gen;
+}
+
 bool cmGlobalGenerator::GenerateImportFile(const std::string &file)
 {
   std::map<std::string, cmExportBuildFileGenerator*>::iterator it
@@ -207,7 +214,12 @@ cmGlobalGenerator::IsExportedTargetsFile(const std::string &filename) const
 {
   const std::map<std::string, cmExportBuildFileGenerator*>::const_iterator it
                                       = this->BuildExportSets.find(filename);
-  return it != this->BuildExportSets.end();
+  if (it == this->BuildExportSets.end())
+    {
+    return false;
+    }
+  return this->BuildExportExportSets.find(filename)
+                                        == this->BuildExportExportSets.end();
 }
 
 // Find the make program for the generator, required for try compiles
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 049b0e6..fc5cab9 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -311,6 +311,7 @@ public:
   std::map<std::string, cmExportBuildFileGenerator*>& GetBuildExportSets()
     {return this->BuildExportSets;}
   void AddBuildExportSet(cmExportBuildFileGenerator*);
+  void AddBuildExportExportSet(cmExportBuildFileGenerator*);
   bool IsExportedTargetsFile(const std::string &filename) const;
   bool GenerateImportFile(const std::string &file);
   cmExportBuildFileGenerator*
@@ -375,6 +376,7 @@ protected:
   // Sets of named target exports
   cmExportSetMap ExportSets;
   std::map<std::string, cmExportBuildFileGenerator*> BuildExportSets;
+  std::map<std::string, cmExportBuildFileGenerator*> BuildExportExportSets;
 
   // Manifest of all targets that will be built for each configuration.
   // This is computed just before local generators generate.
diff --git a/Tests/RunCMake/include/ExportExportInclude-result.txt b/Tests/RunCMake/include/ExportExportInclude-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/include/ExportExportInclude-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/include/ExportExportInclude-stderr.txt b/Tests/RunCMake/include/ExportExportInclude-stderr.txt
new file mode 100644
index 0000000..70d013c
--- /dev/null
+++ b/Tests/RunCMake/include/ExportExportInclude-stderr.txt
@@ -0,0 +1,6 @@
+CMake Error at ExportExportInclude.cmake:6 \(include\):
+  include could not find load file:
+
+    .*/Tests/RunCMake/include/ExportExportInclude-build/theTargets.cmake
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/include/ExportExportInclude.cmake b/Tests/RunCMake/include/ExportExportInclude.cmake
new file mode 100644
index 0000000..14e5d91
--- /dev/null
+++ b/Tests/RunCMake/include/ExportExportInclude.cmake
@@ -0,0 +1,6 @@
+
+add_library(iface INTERFACE)
+install(TARGETS iface EXPORT ifaceExport)
+
+export(EXPORT ifaceExport FILE "${CMAKE_CURRENT_BINARY_DIR}/theTargets.cmake")
+include("${CMAKE_CURRENT_BINARY_DIR}/theTargets.cmake")
diff --git a/Tests/RunCMake/include/RunCMakeTest.cmake b/Tests/RunCMake/include/RunCMakeTest.cmake
index 7fc9a12..bea7d5c 100644
--- a/Tests/RunCMake/include/RunCMakeTest.cmake
+++ b/Tests/RunCMake/include/RunCMakeTest.cmake
@@ -4,3 +4,4 @@ run_cmake(EmptyString)
 run_cmake(EmptyStringOptional)
 run_cmake(CMP0024-WARN)
 run_cmake(CMP0024-NEW)
+run_cmake(ExportExportInclude)

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

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list