[Cmake-commits] CMake branch, next, updated. v2.8.7-3361-ge01f05f
Brad King
brad.king at kitware.com
Wed Mar 28 10:00:46 EDT 2012
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 e01f05f54f9fe927c22f8d880c31571b523bc02e (commit)
via 9a2c60eb836ae26a2cd47f3c21a810047b695db9 (commit)
via 1c489923d54592dfdd0a9421f585bb45ccf9aa44 (commit)
from 8dce4802a87c25881bd5d900d0136161155bb865 (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=e01f05f54f9fe927c22f8d880c31571b523bc02e
commit e01f05f54f9fe927c22f8d880c31571b523bc02e
Merge: 8dce480 9a2c60e
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Mar 28 10:00:43 2012 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Mar 28 10:00:43 2012 -0400
Merge topic 'fix-source-classification' into next
9a2c60e Classify known header file extensions as headers
1c48992 Always compile sources with known language
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9a2c60eb836ae26a2cd47f3c21a810047b695db9
commit 9a2c60eb836ae26a2cd47f3c21a810047b695db9
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Mar 28 08:51:14 2012 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Wed Mar 28 08:59:14 2012 -0400
Classify known header file extensions as headers
Commit 328c0f65 (Simplify cmVisualStudio10TargetGenerator source
classification, 2012-03-19) introduced the first use of source
classification from cmGeneratorTarget (which originated as Makefile
generator logic) in a Visual Studio generator for handling of header
files. Fix classification of header files to match known header
extensions instead of only the HEADER_FILE_ONLY property. Make it
consistent with the "Header Files" source group.
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 3f43465..42dd428 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -30,6 +30,7 @@ cmGeneratorTarget::cmGeneratorTarget(cmTarget* t): Target(t)
//----------------------------------------------------------------------------
void cmGeneratorTarget::ClassifySources()
{
+ cmsys::RegularExpression header(CM_HEADER_REGEX);
bool isObjLib = this->Target->GetType() == cmTarget::OBJECT_LIBRARY;
std::vector<cmSourceFile*> badObjLib;
std::vector<cmSourceFile*> const& sources = this->Target->GetSourceFiles();
@@ -72,6 +73,10 @@ void cmGeneratorTarget::ClassifySources()
this->IDLSources.push_back(sf);
if(isObjLib) { badObjLib.push_back(sf); }
}
+ else if(header.find(sf->GetFullPath().c_str()))
+ {
+ this->HeaderSources.push_back(sf);
+ }
else if(this->GlobalGenerator->IgnoreFile(sf->GetExtension().c_str()))
{
// We only get here if a source file is not an external object
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 56e3305..e7e5eda 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -778,8 +778,7 @@ void cmMakefile::SetLocalGenerator(cmLocalGenerator* lg)
("Source Files",
"\\.(C|M|c|c\\+\\+|cc|cpp|cxx|f|f90|for|fpp"
"|ftn|m|mm|rc|def|r|odl|idl|hpj|bat)$");
- this->AddSourceGroup("Header Files",
- "\\.(h|hh|h\\+\\+|hm|hpp|hxx|in|txx|inl)$");
+ this->AddSourceGroup("Header Files", CM_HEADER_REGEX);
this->AddSourceGroup("CMake Rules", "\\.rule$");
this->AddSourceGroup("Resources", "\\.plist$");
this->AddSourceGroup("Object Files", "\\.(lo|o|obj)$");
diff --git a/Source/cmSourceFile.h b/Source/cmSourceFile.h
index 55147e1..ae01274 100644
--- a/Source/cmSourceFile.h
+++ b/Source/cmSourceFile.h
@@ -116,4 +116,7 @@ private:
std::vector<std::string> Depends;
};
+// TODO: Factor out into platform information modules.
+#define CM_HEADER_REGEX "\\.(h|hh|h\\+\\+|hm|hpp|hxx|in|txx|inl)$"
+
#endif
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1c489923d54592dfdd0a9421f585bb45ccf9aa44
commit 1c489923d54592dfdd0a9421f585bb45ccf9aa44
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Mar 28 08:41:48 2012 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Wed Mar 28 08:58:38 2012 -0400
Always compile sources with known language
Refactoring by commit 11d9b211 (Add cmGeneratorTarget to represent a
target during generation, 2012-03-07) and commit 45c2f932 (Simplify
cmMakefileTargetGenerator using cmGeneratorTarget, 2012-03-07) preserved
behavior introduced by commit 7740ccd1 (some cleanup of the makefile
generator, 2006-02-14) that favored the IgnoreFile extension test over
the availability of a known compilation language associated with a
source file. If a source is not marked as HEADER_FILE_ONLY and has a
known language extension or an explicit LANGUAGE property it should be
treated as that language. The LANGUAGE source file property
documentation says so.
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 7979928..3f43465 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -58,6 +58,10 @@ void cmGeneratorTarget::ClassifySources()
this->ExternalObjects.push_back(sf);
if(isObjLib) { badObjLib.push_back(sf); }
}
+ else if(sf->GetLanguage())
+ {
+ this->ObjectSources.push_back(sf);
+ }
else if(ext == "def")
{
this->ModuleDefinitionFile = sf->GetFullPath();
@@ -75,10 +79,6 @@ void cmGeneratorTarget::ClassifySources()
// No message or diagnosis should be given.
this->ExtraSources.push_back(sf);
}
- else if(sf->GetLanguage())
- {
- this->ObjectSources.push_back(sf);
- }
else
{
this->ExtraSources.push_back(sf);
-----------------------------------------------------------------------
Summary of changes:
Source/cmGeneratorTarget.cxx | 13 +++++++++----
Source/cmMakefile.cxx | 3 +--
Source/cmSourceFile.h | 3 +++
3 files changed, 13 insertions(+), 6 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list