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 f797cb296dd31e22b9c010fec931035a4902dbe7 (commit) via ea12871241e1a943be75e7c987f71f54ec3f3908 (commit) via 894e91a9457800d729f079ec3842e0d0e34b5a50 (commit) via 825d1abf14f8ad880c7e2b3207881b06c43385a6 (commit) from 26c369fd9d66ddaeca9eed272c6bf9aad6ddc6b5 (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=f797cb296dd31e22b9c010fec931035a4902dbe7 commit f797cb296dd31e22b9c010fec931035a4902dbe7 Merge: 26c369f ea12871 Author: Alexander Neundorf <neund...@kde.org> AuthorDate: Wed Sep 19 11:39:20 2012 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Wed Sep 19 11:39:20 2012 -0400 Merge topic 'AutomocUseTargetProperties' into next ea12871 Automoc: also the makefile-COMPILE_DEFINITIONS 894e91a Automoc: do not use DEFINITIONS, but only COMPILE_DEFINITIONS 825d1ab Automoc: fix #13493, use target properties for include dirs http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ea12871241e1a943be75e7c987f71f54ec3f3908 commit ea12871241e1a943be75e7c987f71f54ec3f3908 Author: Alex Neundorf <neund...@kde.org> AuthorDate: Thu Sep 6 22:22:16 2012 +0200 Commit: Alex Neundorf <neund...@kde.org> CommitDate: Thu Sep 6 22:22:16 2012 +0200 Automoc: also the makefile-COMPILE_DEFINITIONS Alex diff --git a/Source/cmQtAutomoc.cxx b/Source/cmQtAutomoc.cxx index 8365766..386a3bf 100644 --- a/Source/cmQtAutomoc.cxx +++ b/Source/cmQtAutomoc.cxx @@ -209,6 +209,12 @@ void cmQtAutomoc::SetupAutomocTarget(cmTarget* target) const char* tmp = target->GetProperty("COMPILE_DEFINITIONS"); std::string _moc_compile_defs = (tmp!=0 ? tmp : ""); + tmp = makefile->GetProperty("COMPILE_DEFINITIONS"); + if (tmp) + { + _moc_compile_defs += ";"; + _moc_compile_defs += tmp; + } tmp = target->GetProperty("AUTOMOC_MOC_OPTIONS"); std::string _moc_options = (tmp!=0 ? tmp : ""); http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=894e91a9457800d729f079ec3842e0d0e34b5a50 commit 894e91a9457800d729f079ec3842e0d0e34b5a50 Author: Alex Neundorf <neund...@kde.org> AuthorDate: Wed Sep 5 22:13:30 2012 +0200 Commit: Alex Neundorf <neund...@kde.org> CommitDate: Wed Sep 5 22:13:30 2012 +0200 Automoc: do not use DEFINITIONS, but only COMPILE_DEFINITIONS The docs say that this is for cmake 2.4 backwards compatibility only, so we probably don't need to support it. Alex diff --git a/Modules/AutomocInfo.cmake.in b/Modules/AutomocInfo.cmake.in index 13f2161..640bf70 100644 --- a/Modules/AutomocInfo.cmake.in +++ b/Modules/AutomocInfo.cmake.in @@ -1,7 +1,6 @@ set(AM_SOURCES @_moc_files@ ) set(AM_HEADERS @_moc_headers@ ) set(AM_MOC_COMPILE_DEFINITIONS @_moc_compile_defs@) -set(AM_MOC_DEFINITIONS @_moc_defs@) set(AM_MOC_INCLUDES @_moc_incs@) set(AM_MOC_OPTIONS @_moc_options@) set(AM_CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE "@CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE@") diff --git a/Source/cmQtAutomoc.cxx b/Source/cmQtAutomoc.cxx index a5ae4c0..8365766 100644 --- a/Source/cmQtAutomoc.cxx +++ b/Source/cmQtAutomoc.cxx @@ -207,9 +207,7 @@ void cmQtAutomoc::SetupAutomocTarget(cmTarget* target) _moc_incs += *incDirIt; } - const char* tmp = makefile->GetProperty("DEFINITIONS"); - std::string _moc_defs = (tmp!=0 ? tmp : ""); - tmp = target->GetProperty("COMPILE_DEFINITIONS"); + const char* tmp = target->GetProperty("COMPILE_DEFINITIONS"); std::string _moc_compile_defs = (tmp!=0 ? tmp : ""); tmp = target->GetProperty("AUTOMOC_MOC_OPTIONS"); std::string _moc_options = (tmp!=0 ? tmp : ""); @@ -222,8 +220,6 @@ void cmQtAutomoc::SetupAutomocTarget(cmTarget* target) cmLocalGenerator::EscapeForCMake(automocTargetName.c_str()).c_str()); makefile->AddDefinition("_moc_incs", cmLocalGenerator::EscapeForCMake(_moc_incs.c_str()).c_str()); - makefile->AddDefinition("_moc_defs", - cmLocalGenerator::EscapeForCMake(_moc_defs.c_str()).c_str()); makefile->AddDefinition("_moc_compile_defs", cmLocalGenerator::EscapeForCMake(_moc_compile_defs.c_str()).c_str()); makefile->AddDefinition("_moc_options", @@ -326,7 +322,6 @@ bool cmQtAutomoc::ReadAutomocInfoFile(cmMakefile* makefile, this->MocExecutable = makefile->GetSafeDefinition("AM_QT_MOC_EXECUTABLE"); this->MocCompileDefinitionsStr = makefile->GetSafeDefinition( "AM_MOC_COMPILE_DEFINITIONS"); - this->MocDefinitionsStr = makefile->GetSafeDefinition("AM_MOC_DEFINITIONS"); this->MocIncludesStr = makefile->GetSafeDefinition("AM_MOC_INCLUDES"); this->MocOptionsStr = makefile->GetSafeDefinition("AM_MOC_OPTIONS"); this->ProjectBinaryDir = makefile->GetSafeDefinition("AM_CMAKE_BINARY_DIR"); @@ -344,7 +339,7 @@ bool cmQtAutomoc::ReadAutomocInfoFile(cmMakefile* makefile, std::string cmQtAutomoc::MakeCompileSettingsString(cmMakefile* makefile) { std::string s; - s += makefile->GetSafeDefinition("AM_MOC_DEFINITIONS"); + s += makefile->GetSafeDefinition("AM_MOC_COMPILE_DEFINITIONS"); s += " ~~~ "; s += makefile->GetSafeDefinition("AM_MOC_INCLUDES"); s += " ~~~ "; @@ -399,32 +394,11 @@ void cmQtAutomoc::Init() std::vector<std::string> cdefList; cmSystemTools::ExpandListArgument(this->MocCompileDefinitionsStr, cdefList); - if (!cdefList.empty()) - { - for(std::vector<std::string>::const_iterator it = cdefList.begin(); - it != cdefList.end(); - ++it) - { - this->MocDefinitions.push_back("-D" + (*it)); - } - } - else + for(std::vector<std::string>::const_iterator it = cdefList.begin(); + it != cdefList.end(); + ++it) { - std::string tmpMocDefs = this->MocDefinitionsStr; - cmSystemTools::ReplaceString(tmpMocDefs, " ", ";"); - - std::vector<std::string> defList; - cmSystemTools::ExpandListArgument(tmpMocDefs, defList); - - for(std::vector<std::string>::const_iterator it = defList.begin(); - it != defList.end(); - ++it) - { - if (this->StartsWith(*it, "-D")) - { - this->MocDefinitions.push_back(*it); - } - } + this->MocDefinitions.push_back("-D" + (*it)); } cmSystemTools::ExpandListArgument(this->MocOptionsStr, this->MocOptions); diff --git a/Source/cmQtAutomoc.h b/Source/cmQtAutomoc.h index f6d72e2..a737477 100644 --- a/Source/cmQtAutomoc.h +++ b/Source/cmQtAutomoc.h @@ -69,7 +69,6 @@ private: std::string Builddir; std::string MocExecutable; std::string MocCompileDefinitionsStr; - std::string MocDefinitionsStr; std::string MocIncludesStr; std::string MocOptionsStr; std::string ProjectBinaryDir; http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=825d1abf14f8ad880c7e2b3207881b06c43385a6 commit 825d1abf14f8ad880c7e2b3207881b06c43385a6 Author: Alex Neundorf <neund...@kde.org> AuthorDate: Mon Aug 27 22:08:54 2012 +0200 Commit: Alex Neundorf <neund...@kde.org> CommitDate: Wed Sep 5 21:49:44 2012 +0200 Automoc: fix #13493, use target properties for include dirs Alex diff --git a/Source/cmQtAutomoc.cxx b/Source/cmQtAutomoc.cxx index 71feffd..a5ae4c0 100644 --- a/Source/cmQtAutomoc.cxx +++ b/Source/cmQtAutomoc.cxx @@ -111,6 +111,7 @@ cmQtAutomoc::cmQtAutomoc() void cmQtAutomoc::SetupAutomocTarget(cmTarget* target) { cmMakefile* makefile = target->GetMakefile(); + cmLocalGenerator* localGen = makefile->GetLocalGenerator(); const char* targetName = target->GetName(); // don't do anything if there is no Qt4 or Qt5Core (which contains moc): std::string qtMajorVersion = makefile->GetSafeDefinition("QT_VERSION_MAJOR"); @@ -193,11 +194,22 @@ void cmQtAutomoc::SetupAutomocTarget(cmTarget* target) } } - const char* tmp = makefile->GetProperty("INCLUDE_DIRECTORIES"); - std::string _moc_incs = (tmp!=0 ? tmp : ""); - tmp = makefile->GetProperty("DEFINITIONS"); + std::vector<std::string> includeDirs = target->GetIncludeDirectories(); + localGen->GetIncludeDirectories(includeDirs, target, "CXX"); + std::string _moc_incs = ""; + const char* sep = ""; + for(std::vector<std::string>::const_iterator incDirIt = includeDirs.begin(); + incDirIt != includeDirs.end(); + ++incDirIt) + { + _moc_incs += sep; + sep = ";"; + _moc_incs += *incDirIt; + } + + const char* tmp = makefile->GetProperty("DEFINITIONS"); std::string _moc_defs = (tmp!=0 ? tmp : ""); - tmp = makefile->GetProperty("COMPILE_DEFINITIONS"); + tmp = target->GetProperty("COMPILE_DEFINITIONS"); std::string _moc_compile_defs = (tmp!=0 ? tmp : ""); tmp = target->GetProperty("AUTOMOC_MOC_OPTIONS"); std::string _moc_options = (tmp!=0 ? tmp : ""); ----------------------------------------------------------------------- Summary of changes: Modules/AutomocInfo.cmake.in | 1 - Source/cmQtAutomoc.cxx | 60 ++++++++++++++++++----------------------- Source/cmQtAutomoc.h | 1 - 3 files changed, 26 insertions(+), 36 deletions(-) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits