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  55dcddb639933cb3790d17462ddd3823637c5d62 (commit)
       via  7c43ab4d1e178ef08c4fe056267b7154217bbb92 (commit)
       via  7f5f8bf1bdcf104a2410b1e3b95509359f691808 (commit)
       via  f193d54f402b436d2510626727d62fe889dfde96 (commit)
      from  e1a66db4d30643d374b16a0a0f15129a4afa516e (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=55dcddb639933cb3790d17462ddd3823637c5d62
commit 55dcddb639933cb3790d17462ddd3823637c5d62
Merge: e1a66db 7c43ab4
Author:     Stephen Kelly <steve...@gmail.com>
AuthorDate: Thu Feb 20 15:25:37 2014 -0500
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Thu Feb 20 15:25:37 2014 -0500

    Merge topic 'target-SOURCES-refactor' into next
    
    7c43ab4d cmGeneratorTarget: Add workarounds for VS 6 and 7.0
    7f5f8bf1 Revert "MSVC7 can't do template partial specialization."
    f193d54f Add missing Exists check.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7c43ab4d1e178ef08c4fe056267b7154217bbb92
commit 7c43ab4d1e178ef08c4fe056267b7154217bbb92
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Thu Feb 20 15:11:24 2014 -0500
Commit:     Stephen Kelly <steve...@gmail.com>
CommitDate: Thu Feb 20 21:25:12 2014 +0100

    cmGeneratorTarget: Add workarounds for VS 6 and 7.0

diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 3092684..f7f11ac 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -70,6 +70,7 @@ struct IDLSourcesTag {};
 struct ResxTag {};
 struct ModuleDefinitionFileTag {};
 
+#if !defined(_MSC_VER) || _MSC_VER >= 1310
 template<typename Tag, typename OtherTag>
 struct IsSameTag
 {
@@ -85,6 +86,25 @@ struct IsSameTag<Tag, Tag>
     Result = true
   };
 };
+#else
+struct IsSameTagBase
+{
+  typedef char (&no_type)[1];
+  typedef char (&yes_type)[2];
+  template<typename T> struct Check;
+  template<typename T> static yes_type check(Check<T>*, Check<T>*);
+  static no_type check(...);
+};
+template<typename Tag1, typename Tag2>
+struct IsSameTag: public IsSameTagBase
+{
+  enum {
+    Result = (sizeof(check(static_cast< Check<Tag1>* >(0),
+                           static_cast< Check<Tag2>* >(0))) ==
+              sizeof(yes_type))
+  };
+};
+#endif
 
 template<bool, typename T>
 void doAccept(T&, cmSourceFile*)
@@ -314,8 +334,9 @@ if (!this->DATA ## Done) \
 data = this->DATA;
 
 #define IMPLEMENT_VISIT(DATA) \
-  IMPLEMENT_VISIT_IMPL(DATA, ) \
+  IMPLEMENT_VISIT_IMPL(DATA, EMPTY) \
 
+#define EMPTY
 #define COMMA ,
 
 //----------------------------------------------------------------------------

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7f5f8bf1bdcf104a2410b1e3b95509359f691808
commit 7f5f8bf1bdcf104a2410b1e3b95509359f691808
Author:     Stephen Kelly <steve...@gmail.com>
AuthorDate: Thu Feb 20 21:24:42 2014 +0100
Commit:     Stephen Kelly <steve...@gmail.com>
CommitDate: Thu Feb 20 21:24:42 2014 +0100

    Revert "MSVC7 can't do template partial specialization."
    
    This reverts commit d7f7b1f905285fd9390f5681a19c5694df4229d4.

diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index f98f079..3092684 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -70,12 +70,39 @@ struct IDLSourcesTag {};
 struct ResxTag {};
 struct ModuleDefinitionFileTag {};
 
-void doAccept(std::vector<cmSourceFile*>& files, cmSourceFile* f)
+template<typename Tag, typename OtherTag>
+struct IsSameTag
+{
+  enum {
+    Result = false
+  };
+};
+
+template<typename Tag>
+struct IsSameTag<Tag, Tag>
+{
+  enum {
+    Result = true
+  };
+};
+
+template<bool, typename T>
+void doAccept(T&, cmSourceFile*)
+{
+}
+
+template<>
+void doAccept<true,
+              std::vector<cmSourceFile*> >(std::vector<cmSourceFile*>& files,
+                                           cmSourceFile* f)
 {
   files.push_back(f);
 }
 
-void doAccept(cmGeneratorTarget::ResxData& data, cmSourceFile* f)
+template<>
+void doAccept<true,
+              cmGeneratorTarget::ResxData>(cmGeneratorTarget::ResxData& data,
+                                            cmSourceFile* f)
 {
   // Build and save the name of the corresponding .h file
   // This relationship will be used later when building the project files.
@@ -88,33 +115,12 @@ void doAccept(cmGeneratorTarget::ResxData& data, 
cmSourceFile* f)
   data.ResxSources.push_back(f);
 }
 
-void doAccept(std::string& data, cmSourceFile* f)
+template<>
+void doAccept<true, std::string>(std::string& data, cmSourceFile* f)
 {
   data = f->GetFullPath();
 }
 
-#define ACCEPT_OVERLOAD(DATATYPE, MATCH_TAG) \
-template<typename Data, typename Tag> \
-void acceptProxy(Data&, cmSourceFile*, Tag, MATCH_TAG) \
-{ \
-} \
- \
-template<> \
-void acceptProxy(DATATYPE& data, cmSourceFile* f, \
-                 MATCH_TAG, MATCH_TAG) \
-{ \
-  doAccept(data, f); \
-}
-
-ACCEPT_OVERLOAD(std::vector<cmSourceFile*>, ObjectSourcesTag)
-ACCEPT_OVERLOAD(std::vector<cmSourceFile*>, CustomCommandsTag)
-ACCEPT_OVERLOAD(std::vector<cmSourceFile*>, ExtraSourcesTag)
-ACCEPT_OVERLOAD(std::vector<cmSourceFile*>, HeaderSourcesTag)
-ACCEPT_OVERLOAD(std::vector<cmSourceFile*>, ExternalObjectsTag)
-ACCEPT_OVERLOAD(std::vector<cmSourceFile*>, IDLSourcesTag)
-ACCEPT_OVERLOAD(cmGeneratorTarget::ResxData, ResxTag)
-ACCEPT_OVERLOAD(std::string, ModuleDefinitionFileTag)
-
 //----------------------------------------------------------------------------
 template<typename Tag, typename DataType = std::vector<cmSourceFile*> >
 struct TagVisitor
@@ -144,26 +150,21 @@ struct TagVisitor
   void Accept(cmSourceFile *sf)
   {
     std::string ext = cmSystemTools::LowerCase(sf->GetExtension());
-    Tag tag;
     if(sf->GetCustomCommand())
       {
-      CustomCommandsTag customCommandsTag;
-      acceptProxy(this->Data, sf, tag, customCommandsTag);
+      doAccept<IsSameTag<Tag, CustomCommandsTag>::Result>(this->Data, sf);
       }
     else if(this->Target->GetType() == cmTarget::UTILITY)
       {
-      ExtraSourcesTag extraSourcesTag;
-      acceptProxy(this->Data, sf, tag, extraSourcesTag);
+      doAccept<IsSameTag<Tag, ExtraSourcesTag>::Result>(this->Data, sf);
       }
     else if(sf->GetPropertyAsBool("HEADER_FILE_ONLY"))
       {
-      HeaderSourcesTag headerSourcesTag;
-      acceptProxy(this->Data, sf, tag, headerSourcesTag);
+      doAccept<IsSameTag<Tag, HeaderSourcesTag>::Result>(this->Data, sf);
       }
     else if(sf->GetPropertyAsBool("EXTERNAL_OBJECT"))
       {
-      ExternalObjectsTag externalObjectsTag;
-      acceptProxy(this->Data, sf, tag, externalObjectsTag);
+      doAccept<IsSameTag<Tag, ExternalObjectsTag>::Result>(this->Data, sf);
       if(this->IsObjLib)
         {
         this->BadObjLibFiles.push_back(sf);
@@ -171,13 +172,12 @@ struct TagVisitor
       }
     else if(sf->GetLanguage())
       {
-      ObjectSourcesTag objectSourcesTag;
-      acceptProxy(this->Data, sf, tag, objectSourcesTag);
+      doAccept<IsSameTag<Tag, ObjectSourcesTag>::Result>(this->Data, sf);
       }
     else if(ext == "def")
       {
-      ModuleDefinitionFileTag moduleDefinitionFileTag;
-      acceptProxy(this->Data, sf, tag, moduleDefinitionFileTag);
+      doAccept<IsSameTag<Tag, ModuleDefinitionFileTag>::Result>(this->Data,
+                                                                sf);
       if(this->IsObjLib)
         {
         this->BadObjLibFiles.push_back(sf);
@@ -185,8 +185,7 @@ struct TagVisitor
       }
     else if(ext == "idl")
       {
-      IDLSourcesTag idlSourcesTag;
-      acceptProxy(this->Data, sf, tag, idlSourcesTag);
+      doAccept<IsSameTag<Tag, IDLSourcesTag>::Result>(this->Data, sf);
       if(this->IsObjLib)
         {
         this->BadObjLibFiles.push_back(sf);
@@ -194,23 +193,19 @@ struct TagVisitor
       }
     else if(ext == "resx")
       {
-      ResxTag resxTag;
-      acceptProxy(this->Data, sf, tag, resxTag);
+      doAccept<IsSameTag<Tag, ResxTag>::Result>(this->Data, sf);
       }
     else if(this->Header.find(sf->GetFullPath().c_str()))
       {
-      HeaderSourcesTag headerSourcesTag;
-      acceptProxy(this->Data, sf, tag, headerSourcesTag);
+      doAccept<IsSameTag<Tag, HeaderSourcesTag>::Result>(this->Data, sf);
       }
     else if(this->GlobalGenerator->IgnoreFile(sf->GetExtension().c_str()))
       {
-      ExtraSourcesTag extraSourcesTag;
-      acceptProxy(this->Data, sf, tag, extraSourcesTag);
+      doAccept<IsSameTag<Tag, ExtraSourcesTag>::Result>(this->Data, sf);
       }
     else
       {
-      ExtraSourcesTag extraSourcesTag;
-      acceptProxy(this->Data, sf, tag, extraSourcesTag);
+      doAccept<IsSameTag<Tag, ExtraSourcesTag>::Result>(this->Data, sf);
       if(this->IsObjLib && ext != "txt")
         {
         this->BadObjLibFiles.push_back(sf);

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f193d54f402b436d2510626727d62fe889dfde96
commit f193d54f402b436d2510626727d62fe889dfde96
Author:     Stephen Kelly <steve...@gmail.com>
AuthorDate: Thu Feb 20 21:21:09 2014 +0100
Commit:     Stephen Kelly <steve...@gmail.com>
CommitDate: Thu Feb 20 21:21:09 2014 +0100

    Add missing Exists check.

diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index f833515..43adbfc 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -5200,12 +5200,10 @@ cmTarget::LinkInterface const* 
cmTarget::GetLinkInterface(const char* config,
     cmTargetInternals::LinkInterfaceMapType::value_type entry(key, iface);
     i = this->Internal->LinkInterfaceMap.insert(entry).first;
     }
-  else if(!i->second.Complete)
+  else if(!i->second.Complete && i->second.Exists)
     {
-      this->Internal->ComputeLinkInterface(this, config,
-                                           i->second,
-                                              head,
-                                              i->second.ExplicitLibraries);
+    this->Internal->ComputeLinkInterface(this, config, i->second, head,
+                                         i->second.ExplicitLibraries);
     }
 
   return i->second.Exists ? &i->second : 0;

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

Summary of changes:
 Source/cmGeneratorTarget.cxx |  114 ++++++++++++++++++++++++------------------
 Source/cmTarget.cxx          |    8 ++-
 2 files changed, 68 insertions(+), 54 deletions(-)


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits

Reply via email to