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 855155aa120ac3aeddcadc73ebf45bc2fb376efe (commit) via 8c8305f286dab4e374bb8142ee991e00c57e418b (commit) from 76d76f425f82daeb7450237ee2c47d4141e519d9 (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=855155aa120ac3aeddcadc73ebf45bc2fb376efe commit 855155aa120ac3aeddcadc73ebf45bc2fb376efe Merge: 76d76f4 8c8305f Author: Alexander Neundorf <neund...@kde.org> AuthorDate: Mon Oct 31 17:12:03 2011 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Mon Oct 31 17:12:03 2011 -0400 Merge topic 'DontCrashAutomocWithEmptyCompileDefs' into next 8c8305f don't crash in automoc with empty COMPILE_DEFINITIONS property http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8c8305f286dab4e374bb8142ee991e00c57e418b commit 8c8305f286dab4e374bb8142ee991e00c57e418b Author: Alex Neundorf <neund...@kde.org> AuthorDate: Mon Oct 31 22:07:12 2011 +0100 Commit: Alex Neundorf <neund...@kde.org> CommitDate: Mon Oct 31 22:07:12 2011 +0100 don't crash in automoc with empty COMPILE_DEFINITIONS property Reported by Laszlo Papp: http://www.cmake.org/pipermail/cmake/2011-October/047089.html Alex diff --git a/Source/cmQtAutomoc.cxx b/Source/cmQtAutomoc.cxx index a839489..fdc19e4 100644 --- a/Source/cmQtAutomoc.cxx +++ b/Source/cmQtAutomoc.cxx @@ -124,21 +124,22 @@ void cmQtAutomoc::SetupAutomocTarget(cmTarget* target) } } - std::string _moc_incs = makefile->GetProperty("INCLUDE_DIRECTORIES"); - std::string _moc_defs = makefile->GetProperty("DEFINITIONS"); - std::string _moc_compile_defs = makefile->GetProperty("COMPILE_DEFINITIONS"); + const char* _moc_incs = makefile->GetProperty("INCLUDE_DIRECTORIES"); + const char* _moc_defs = makefile->GetProperty("DEFINITIONS"); + const char* _moc_compile_defs = makefile->GetProperty("COMPILE_DEFINITIONS"); // forget the variables added here afterwards again: cmMakefile::ScopePushPop varScope(makefile); static_cast<void>(varScope); makefile->AddDefinition("_moc_target_name", automocTargetName.c_str()); - makefile->AddDefinition("_moc_incs", _moc_incs.c_str()); - makefile->AddDefinition("_moc_defs", _moc_defs.c_str()); - makefile->AddDefinition("_moc_compile_defs", _moc_compile_defs.c_str()); + makefile->AddDefinition("_moc_incs", _moc_incs!=0 ? _moc_incs : ""); + makefile->AddDefinition("_moc_defs", _moc_defs!=0 ? _moc_defs : ""); + makefile->AddDefinition("_moc_compile_defs", + _moc_compile_defs!=0 ? _moc_compile_defs : ""); makefile->AddDefinition("_moc_files", _moc_files.c_str()); makefile->AddDefinition("_moc_headers", _moc_headers.c_str()); - const char* cmakeRoot = makefile->GetDefinition("CMAKE_ROOT"); + const char* cmakeRoot = makefile->GetSafeDefinition("CMAKE_ROOT"); std::string inputFile = cmakeRoot; inputFile += "/Modules/AutomocInfo.cmake.in"; std::string outputFile = targetDir; ----------------------------------------------------------------------- Summary of changes: Source/cmQtAutomoc.cxx | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits