[Cmake-commits] CMake branch, next, updated. v2.8.12-4546-ge7bd8e0

Nils Gladitz nilsgladitz at gmail.com
Sat Oct 26 18:09:34 EDT 2013


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  e7bd8e08cd1a675e41d6c3a491a2c585b955f6c4 (commit)
       via  ec89a398292eb9467ba490e1dbe6e5a7d15466d7 (commit)
      from  70b26d6e1e8d30b498e0b915cd4ae4d56b2f219e (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=e7bd8e08cd1a675e41d6c3a491a2c585b955f6c4
commit e7bd8e08cd1a675e41d6c3a491a2c585b955f6c4
Merge: 70b26d6 ec89a39
Author:     Nils Gladitz <nilsgladitz at gmail.com>
AuthorDate: Sat Oct 26 18:09:33 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Oct 26 18:09:33 2013 -0400

    Merge topic 'fix-custom-source-with-flags-crash' into next
    
    ec89a39 Generators: don't append sources from utility targets to objectSources


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ec89a398292eb9467ba490e1dbe6e5a7d15466d7
commit ec89a398292eb9467ba490e1dbe6e5a7d15466d7
Author:     Nils Gladitz <nilsgladitz at gmail.com>
AuthorDate: Sat Oct 26 23:38:38 2013 +0200
Commit:     Nils Gladitz <nilsgladitz at gmail.com>
CommitDate: Sat Oct 26 23:38:38 2013 +0200

    Generators: don't append sources from utility targets to objectSources

diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 62ac263..511ae8a 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -114,7 +114,10 @@ std::vector<cmSourceFile*> const& cmGeneratorTarget::GetSourceFiles()
 void cmGeneratorTarget::ClassifySources()
 {
   cmsys::RegularExpression header(CM_HEADER_REGEX);
-  bool isObjLib = this->Target->GetType() == cmTarget::OBJECT_LIBRARY;
+
+  cmTarget::TargetType targetType = this->Target->GetType();
+  bool isObjLib = targetType == cmTarget::OBJECT_LIBRARY;
+
   std::vector<cmSourceFile*> badObjLib;
   std::vector<cmSourceFile*> const& sources = this->Target->GetSourceFiles();
   for(std::vector<cmSourceFile*>::const_iterator si = sources.begin();
@@ -126,6 +129,10 @@ void cmGeneratorTarget::ClassifySources()
       {
       this->CustomCommands.push_back(sf);
       }
+    else if(targetType == cmTarget::UTILITY)
+      {
+      this->ExtraSources.push_back(sf);
+      }
     else if(sf->GetPropertyAsBool("HEADER_FILE_ONLY"))
       {
       this->HeaderSources.push_back(sf);
diff --git a/Tests/CustomCommand/CMakeLists.txt b/Tests/CustomCommand/CMakeLists.txt
index 30daa7d..f0229df 100644
--- a/Tests/CustomCommand/CMakeLists.txt
+++ b/Tests/CustomCommand/CMakeLists.txt
@@ -449,3 +449,7 @@ set_property(SOURCE perconfig.out PROPERTY SYMBOLIC 1)
 add_custom_target(perconfig_target ALL
   COMMAND ${CMAKE_COMMAND} -E echo "perconfig=$<TARGET_FILE:perconfig>" "config=$<CONFIGURATION>"
   DEPENDS perconfig.out)
+
+# Test SOURCES in add_custom_target() with COMPILE_DEFINITIONS (Issue #14511)
+add_custom_target(issue14511 SOURCES issue14511.cpp)
+set_property(SOURCE issue14511 PROPERTY COMPILE_DEFINITIONS "TEST")
diff --git a/Tests/CustomCommand/issue14511.cpp b/Tests/CustomCommand/issue14511.cpp
new file mode 100644
index 0000000..e69de29

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

Summary of changes:
 Source/cmGeneratorTarget.cxx                       |    9 ++++++++-
 Tests/CustomCommand/CMakeLists.txt                 |    4 ++++
 .../hello.f => Tests/CustomCommand/issue14511.cpp  |    0
 3 files changed, 12 insertions(+), 1 deletions(-)
 copy Modules/IntelVSImplicitPath/hello.f => Tests/CustomCommand/issue14511.cpp (100%)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list