[Cmake-commits] CMake branch, next, updated. v2.8.10.2-2058-g3e627b6
Alexander Neundorf
neundorf at kde.org
Sun Feb 10 12:36:35 EST 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 3e627b63fa85cc3cc8fa524905f7f121a1b5bbd1 (commit)
via 27e14a813cd399db778485961c0e66bd5cf488d6 (commit)
via 10511aa0849936df3724556f1f42fc3e4cf43f9f (commit)
via 12806779be9e8f18c6eb1bbf7fb69640af1fcf1d (commit)
via 4db712f6efe14d65b05236c210f7c01cc754ed2c (commit)
from 73afba6b813dee2dce1d5b15c6a8eea4d7da4f00 (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=3e627b63fa85cc3cc8fa524905f7f121a1b5bbd1
commit 3e627b63fa85cc3cc8fa524905f7f121a1b5bbd1
Merge: 73afba6 27e14a8
Author: Alexander Neundorf <neundorf at kde.org>
AuthorDate: Sun Feb 10 12:36:34 2013 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun Feb 10 12:36:34 2013 -0500
Merge topic 'UseMakefileHeaderExtensions' into next
27e14a8 automoc: use the header extensions from cmMakefile
10511aa automoc: use a std::vector<> instead a std::list
1280677 CMake Nightly Date Stamp
4db712f CMake Nightly Date Stamp
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=27e14a813cd399db778485961c0e66bd5cf488d6
commit 27e14a813cd399db778485961c0e66bd5cf488d6
Author: Alex Neundorf <neundorf at kde.org>
AuthorDate: Sun Feb 10 17:58:29 2013 +0100
Commit: Alex Neundorf <neundorf at kde.org>
CommitDate: Sun Feb 10 18:10:20 2013 +0100
automoc: use the header extensions from cmMakefile
Instead of having an own set of C header extensions, use
cmMakefile::GetHeaderExtensions() (#13904)
Alex
diff --git a/Source/cmQtAutomoc.cxx b/Source/cmQtAutomoc.cxx
index 8a2d308..4818f1b 100644
--- a/Source/cmQtAutomoc.cxx
+++ b/Source/cmQtAutomoc.cxx
@@ -51,7 +51,7 @@ static std::string findMatchingHeader(const std::string& absPath,
ext != headerExtensions.end();
++ext)
{
- std::string sourceFilePath = absPath + basename + (*ext);
+ std::string sourceFilePath = absPath + basename + "." + (*ext);
if (cmsys::SystemTools::FileExists(sourceFilePath.c_str()))
{
header = sourceFilePath;
@@ -59,7 +59,7 @@ static std::string findMatchingHeader(const std::string& absPath,
}
if (!mocSubDir.empty())
{
- sourceFilePath = mocSubDir + basename + (*ext);
+ sourceFilePath = mocSubDir + basename + "." + (*ext);
if (cmsys::SystemTools::FileExists(sourceFilePath.c_str()))
{
header = sourceFilePath;
@@ -296,7 +296,7 @@ bool cmQtAutomoc::Run(const char* targetDirectory)
if (this->QtMajorVersion == "4" || this->QtMajorVersion == "5")
{
- success = this->RunAutomoc();
+ success = this->RunAutomoc(makefile);
}
this->WriteOldMocDefinitionsFile(targetDirectory);
@@ -504,7 +504,7 @@ void cmQtAutomoc::Init()
}
-bool cmQtAutomoc::RunAutomoc()
+bool cmQtAutomoc::RunAutomoc(cmMakefile* makefile)
{
if (!cmsys::SystemTools::FileExists(this->OutMocCppFilename.c_str())
|| (this->OldCompileSettingsStr != this->CurrentCompileSettingsStr))
@@ -528,22 +528,8 @@ bool cmQtAutomoc::RunAutomoc()
std::vector<std::string> sourceFiles;
cmSystemTools::ExpandListArgument(this->Sources, sourceFiles);
- std::vector<std::string> headerExtensions;
- headerExtensions.push_back(".h");
- headerExtensions.push_back(".hpp");
- headerExtensions.push_back(".hxx");
-#if defined(_WIN32)
- // not case sensitive, don't add ".H"
-#elif defined(__APPLE__)
- // detect case-sensitive filesystem
- long caseSensitive = pathconf(this->Srcdir.c_str(), _PC_CASE_SENSITIVE);
- if (caseSensitive == 1)
- {
- headerExtensions.push_back(".H");
- }
-#else
- headerExtensions.push_back(".H");
-#endif
+ const std::vector<std::string>& headerExtensions =
+ makefile->GetHeaderExtensions();
for (std::vector<std::string>::const_iterator it = sourceFiles.begin();
it != sourceFiles.end();
@@ -945,7 +931,7 @@ void cmQtAutomoc::SearchHeadersForCppFile(const std::string& absFilename,
ext != headerExtensions.end();
++ext)
{
- const std::string headerName = absPath + basename + (*ext);
+ const std::string headerName = absPath + basename + "." + (*ext);
if (cmsys::SystemTools::FileExists(headerName.c_str()))
{
absHeaders.insert(headerName);
@@ -956,7 +942,7 @@ void cmQtAutomoc::SearchHeadersForCppFile(const std::string& absFilename,
ext != headerExtensions.end();
++ext)
{
- const std::string privateHeaderName = absPath+basename+"_p"+(*ext);
+ const std::string privateHeaderName = absPath+basename+"_p."+(*ext);
if (cmsys::SystemTools::FileExists(privateHeaderName.c_str()))
{
absHeaders.insert(privateHeaderName);
@@ -1090,7 +1076,7 @@ std::string cmQtAutomoc::Join(const std::vector<std::string>& lst,
it != lst.end();
++it)
{
- result += (*it) + separator;
+ result += "." + (*it) + separator;
}
result.erase(result.end() - 1);
return result;
diff --git a/Source/cmQtAutomoc.h b/Source/cmQtAutomoc.h
index ea30b15..69da80e 100644
--- a/Source/cmQtAutomoc.h
+++ b/Source/cmQtAutomoc.h
@@ -37,7 +37,7 @@ private:
std::string MakeCompileSettingsString(cmMakefile* makefile);
- bool RunAutomoc();
+ bool RunAutomoc(cmMakefile* makefile);
bool GenerateMoc(const std::string& sourceFile,
const std::string& mocFileName);
void ParseCppFile(const std::string& absFilename,
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=10511aa0849936df3724556f1f42fc3e4cf43f9f
commit 10511aa0849936df3724556f1f42fc3e4cf43f9f
Author: Alex Neundorf <neundorf at kde.org>
AuthorDate: Sun Feb 10 17:49:42 2013 +0100
Commit: Alex Neundorf <neundorf at kde.org>
CommitDate: Sun Feb 10 17:49:42 2013 +0100
automoc: use a std::vector<> instead a std::list
Alex
diff --git a/Source/cmQtAutomoc.cxx b/Source/cmQtAutomoc.cxx
index cc42175..8a2d308 100644
--- a/Source/cmQtAutomoc.cxx
+++ b/Source/cmQtAutomoc.cxx
@@ -44,10 +44,10 @@ static bool containsQ_OBJECT(const std::string& text)
static std::string findMatchingHeader(const std::string& absPath,
const std::string& mocSubDir,
const std::string& basename,
- const std::list<std::string>& headerExtensions)
+ const std::vector<std::string>& headerExtensions)
{
std::string header;
- for(std::list<std::string>::const_iterator ext = headerExtensions.begin();
+ for(std::vector<std::string>::const_iterator ext = headerExtensions.begin();
ext != headerExtensions.end();
++ext)
{
@@ -528,7 +528,7 @@ bool cmQtAutomoc::RunAutomoc()
std::vector<std::string> sourceFiles;
cmSystemTools::ExpandListArgument(this->Sources, sourceFiles);
- std::list<std::string> headerExtensions;
+ std::vector<std::string> headerExtensions;
headerExtensions.push_back(".h");
headerExtensions.push_back(".hpp");
headerExtensions.push_back(".hxx");
@@ -643,7 +643,7 @@ bool cmQtAutomoc::RunAutomoc()
void cmQtAutomoc::ParseCppFile(const std::string& absFilename,
- const std::list<std::string>& headerExtensions,
+ const std::vector<std::string>& headerExtensions,
std::map<std::string, std::string>& includedMocs)
{
cmsys::RegularExpression mocIncludeRegExp(
@@ -821,7 +821,7 @@ void cmQtAutomoc::ParseCppFile(const std::string& absFilename,
void cmQtAutomoc::StrictParseCppFile(const std::string& absFilename,
- const std::list<std::string>& headerExtensions,
+ const std::vector<std::string>& headerExtensions,
std::map<std::string, std::string>& includedMocs)
{
cmsys::RegularExpression mocIncludeRegExp(
@@ -932,8 +932,8 @@ void cmQtAutomoc::StrictParseCppFile(const std::string& absFilename,
void cmQtAutomoc::SearchHeadersForCppFile(const std::string& absFilename,
- const std::list<std::string>& headerExtensions,
- std::set<std::string>& absHeaders)
+ const std::vector<std::string>& headerExtensions,
+ std::set<std::string>& absHeaders)
{
// search for header files and private header files we may need to moc:
const std::string basename =
@@ -941,7 +941,7 @@ void cmQtAutomoc::SearchHeadersForCppFile(const std::string& absFilename,
const std::string absPath = cmsys::SystemTools::GetFilenamePath(
cmsys::SystemTools::GetRealPath(absFilename.c_str())) + '/';
- for(std::list<std::string>::const_iterator ext = headerExtensions.begin();
+ for(std::vector<std::string>::const_iterator ext = headerExtensions.begin();
ext != headerExtensions.end();
++ext)
{
@@ -952,7 +952,7 @@ void cmQtAutomoc::SearchHeadersForCppFile(const std::string& absFilename,
break;
}
}
- for(std::list<std::string>::const_iterator ext = headerExtensions.begin();
+ for(std::vector<std::string>::const_iterator ext = headerExtensions.begin();
ext != headerExtensions.end();
++ext)
{
@@ -1077,7 +1077,8 @@ bool cmQtAutomoc::GenerateMoc(const std::string& sourceFile,
}
-std::string cmQtAutomoc::Join(const std::list<std::string>& lst,char separator)
+std::string cmQtAutomoc::Join(const std::vector<std::string>& lst,
+ char separator)
{
if (lst.empty())
{
@@ -1085,7 +1086,7 @@ std::string cmQtAutomoc::Join(const std::list<std::string>& lst,char separator)
}
std::string result;
- for (std::list<std::string>::const_iterator it = lst.begin();
+ for (std::vector<std::string>::const_iterator it = lst.begin();
it != lst.end();
++it)
{
diff --git a/Source/cmQtAutomoc.h b/Source/cmQtAutomoc.h
index a737477..ea30b15 100644
--- a/Source/cmQtAutomoc.h
+++ b/Source/cmQtAutomoc.h
@@ -41,14 +41,14 @@ private:
bool GenerateMoc(const std::string& sourceFile,
const std::string& mocFileName);
void ParseCppFile(const std::string& absFilename,
- const std::list<std::string>& headerExtensions,
+ const std::vector<std::string>& headerExtensions,
std::map<std::string, std::string>& includedMocs);
void StrictParseCppFile(const std::string& absFilename,
- const std::list<std::string>& headerExtensions,
+ const std::vector<std::string>& headerExtensions,
std::map<std::string, std::string>& includedMocs);
void SearchHeadersForCppFile(const std::string& absFilename,
- const std::list<std::string>& headerExtensions,
- std::set<std::string>& absHeaders);
+ const std::vector<std::string>& headerExtensions,
+ std::set<std::string>& absHeaders);
void ParseHeaders(const std::set<std::string>& absHeaders,
const std::map<std::string, std::string>& includedMocs,
@@ -56,7 +56,7 @@ private:
void Init();
- std::string Join(const std::list<std::string>& lst, char separator);
+ std::string Join(const std::vector<std::string>& lst, char separator);
bool EndsWith(const std::string& str, const std::string& with);
bool StartsWith(const std::string& str, const std::string& with);
std::string ReadAll(const std::string& filename);
-----------------------------------------------------------------------
Summary of changes:
Source/CMakeVersion.cmake | 2 +-
Source/cmQtAutomoc.cxx | 53 +++++++++++++++++----------------------------
Source/cmQtAutomoc.h | 12 +++++-----
3 files changed, 27 insertions(+), 40 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list