[Cmake-commits] CMake branch, next, updated. v2.8.12.2-1589-g1e7dcd0

Stephen Kelly steveire at gmail.com
Thu Feb 20 17:10: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  1e7dcd02000057d1506afae7bdbdb3d4e15e5495 (commit)
       via  66f252e3cf5ba21191e63c76a1542285c9de3dda (commit)
      from  7532e3712d18ec60ef3f59e979b81b34fb7b99c9 (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=1e7dcd02000057d1506afae7bdbdb3d4e15e5495
commit 1e7dcd02000057d1506afae7bdbdb3d4e15e5495
Merge: 7532e37 66f252e
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Feb 20 17:10:43 2014 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Feb 20 17:10:43 2014 -0500

    Merge topic 'target-SOURCES-refactor' into next
    
    66f252e3 Find source files when they are requested only.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=66f252e3cf5ba21191e63c76a1542285c9de3dda
commit 66f252e3cf5ba21191e63c76a1542285c9de3dda
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Feb 20 23:03:35 2014 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Feb 20 23:10:20 2014 +0100

    Find source files when they are requested only.

diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 004c610..38b6936 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -24,24 +24,6 @@
 
 #include "assert.h"
 
-
-//----------------------------------------------------------------------------
-bool FindSourceFile(cmSourceFile *sf, cmTarget *tgt)
-{
-  std::string e;
-  if((sf)->GetFullPath(&e).empty())
-    {
-    if(!e.empty())
-      {
-      cmake* cm = tgt->GetMakefile()->GetCMakeInstance();
-      cm->IssueMessage(cmake::FATAL_ERROR, e,
-                       tgt->GetBacktrace());
-      }
-    return false;
-    }
-  return true;
-}
-
 //----------------------------------------------------------------------------
 void reportBadObjLib(std::vector<cmSourceFile*> const& badObjLib,
                      cmTarget *target, cmake *cm)
@@ -314,10 +296,6 @@ static void handleSystemIncludesDep(cmMakefile *mf, cmTarget* depTgt,
   for(std::vector<cmSourceFile*>::const_iterator si = sourceFiles.begin(); \
       si != sourceFiles.end(); ++si) \
     { \
-    if (!FindSourceFile(*si, this->Target)) \
-      { \
-      break; \
-      } \
     visitor.Accept(*si); \
     } \
   } \
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 43adbfc..c70ff3b 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -533,6 +533,22 @@ bool cmTarget::IsBundleOnApple() const
 void cmTarget::GetSourceFiles(std::vector<cmSourceFile*> &files) const
 {
   assert(this->GetType() != INTERFACE_LIBRARY);
+  for(std::vector<cmSourceFile*>::const_iterator
+      si = this->SourceFiles.begin();
+      si != this->SourceFiles.end(); ++si)
+    {
+    std::string e;
+    if((*si)->GetFullPath(&e).empty())
+      {
+      if(!e.empty())
+        {
+        cmake* cm = this->Makefile->GetCMakeInstance();
+        cm->IssueMessage(cmake::FATAL_ERROR, e,
+                          this->GetBacktrace());
+        }
+      return;
+      }
+    }
   files = this->SourceFiles;
 }
 
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 1f5ce01..8074a01 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -210,7 +210,7 @@ if(BUILD_TESTING)
   ADD_TEST_MACRO(PreOrder PreOrder)
   ADD_TEST_MACRO(MissingSourceFile MissingSourceFile)
   set_tests_properties(MissingSourceFile PROPERTIES
-    PASS_REGULAR_EXPRESSION "CMake Error in CMakeLists.txt:[ \r\n]*Cannot find source file:[ \r\n]*DoesNotExist/MissingSourceFile.c")
+    PASS_REGULAR_EXPRESSION "CMake Error at CMakeLists.txt:3 \\(add_executable\\):[ \r\n]*Cannot find source file:[ \r\n]*DoesNotExist/MissingSourceFile.c")
   if(CMAKE_Fortran_COMPILER)
     ADD_TEST_MACRO(FortranOnly FortranOnly)
   endif()
diff --git a/Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt b/Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt
index b4188b3..411cd7c 100644
--- a/Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt
+++ b/Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt
@@ -1,7 +1,9 @@
-CMake Error in CMakeLists.txt:
+CMake Error at MissingSource.cmake:1 \(add_library\):
   Cannot find source file:
 
     missing.c
 
   Tried extensions( \.[A-Za-z+]+|
  )*
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/interface_library/global-interface-stderr.txt b/Tests/RunCMake/interface_library/global-interface-stderr.txt
index 80fd594..24edd0f 100644
--- a/Tests/RunCMake/interface_library/global-interface-stderr.txt
+++ b/Tests/RunCMake/interface_library/global-interface-stderr.txt
@@ -1,7 +1,9 @@
-CMake Error in CMakeLists.txt:
+CMake Error at global-interface.cmake:2 \(add_library\):
   Cannot find source file:
 
     GLOBAL
 
   Tried extensions \.c \.C \.c\+\+ \.cc \.cpp \.cxx \.m \.M \.mm \.h \.hh \.h\+\+ \.hm \.hpp
   \.hxx \.in \.txx
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)

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

Summary of changes:
 Source/cmGeneratorTarget.cxx                       |   22 --------------------
 Source/cmTarget.cxx                                |   16 ++++++++++++++
 Tests/CMakeLists.txt                               |    2 +-
 .../ObjectLibrary/MissingSource-stderr.txt         |    4 +++-
 .../interface_library/global-interface-stderr.txt  |    4 +++-
 5 files changed, 23 insertions(+), 25 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list