[Cmake-commits] CMake branch, next, updated. v2.8.12.1-6681-gf848321

Stephen Kelly steveire at gmail.com
Sat Jan 4 08:07:37 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  f848321a280f4dff96e2b11eb5aa3f2ac6ba5ae8 (commit)
       via  d492413f0de94584b64151b8b8d1baea2255bedb (commit)
      from  9304e51e8ee1f6d50fcd755277d4f93244cb4cf7 (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=f848321a280f4dff96e2b11eb5aa3f2ac6ba5ae8
commit f848321a280f4dff96e2b11eb5aa3f2ac6ba5ae8
Merge: 9304e51 d492413
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jan 4 08:07:34 2014 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Jan 4 08:07:34 2014 -0500

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


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d492413f0de94584b64151b8b8d1baea2255bedb
commit d492413f0de94584b64151b8b8d1baea2255bedb
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 11:52:04 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.

diff --git a/Source/cmExportBuildFileGenerator.cxx b/Source/cmExportBuildFileGenerator.cxx
index b669cd1..f548c50 100644
--- a/Source/cmExportBuildFileGenerator.cxx
+++ b/Source/cmExportBuildFileGenerator.cxx
@@ -164,6 +164,12 @@ void cmExportBuildFileGenerator::SetExportSet(cmExportSet *exportSet)
 }
 
 //----------------------------------------------------------------------------
+cmExportSet* cmExportBuildFileGenerator::GetExportSet() const
+{
+  return this->ExportSet;
+}
+
+//----------------------------------------------------------------------------
 void
 cmExportBuildFileGenerator
 ::SetImportLocationProperty(const char* config, std::string const& suffix,
diff --git a/Source/cmExportBuildFileGenerator.h b/Source/cmExportBuildFileGenerator.h
index cea2099..cd11678 100644
--- a/Source/cmExportBuildFileGenerator.h
+++ b/Source/cmExportBuildFileGenerator.h
@@ -39,6 +39,7 @@ public:
     { this->Targets.insert(this->Targets.end(),
       targets.begin(), targets.end()); }
   void SetExportSet(cmExportSet*);
+  cmExportSet* GetExportSet() const;
 
   /** Set whether to append generated code to the output file.  */
   void SetAppendMode(bool append) { this->AppendMode = append; }
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 226a45a..3736fde 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -207,7 +207,11 @@ 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 it->second->GetExportSet() ? false : true;
 }
 
 // Find the make program for the generator, required for try compiles
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:
 Source/cmExportBuildFileGenerator.cxx              |    6 ++++++
 Source/cmExportBuildFileGenerator.h                |    1 +
 Source/cmGlobalGenerator.cxx                       |    6 +++++-
 .../ExportExportInclude-result.txt}                |    0
 .../include/ExportExportInclude-stderr.txt         |    6 ++++++
 Tests/RunCMake/include/ExportExportInclude.cmake   |    6 ++++++
 Tests/RunCMake/include/RunCMakeTest.cmake          |    1 +
 7 files changed, 25 insertions(+), 1 deletions(-)
 copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => include/ExportExportInclude-result.txt} (100%)
 create mode 100644 Tests/RunCMake/include/ExportExportInclude-stderr.txt
 create mode 100644 Tests/RunCMake/include/ExportExportInclude.cmake


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list