[Cmake-commits] CMake branch, next, updated. v2.8.6-1732-gd86be11

Alexander Neundorf neundorf at kde.org
Tue Nov 1 09:03:14 EDT 2011


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  d86be11b853ef01f6526d19f3bd24f65bec2d054 (commit)
       via  1ecc55aa7b95a487996654e81d6493e7b72961c0 (commit)
      from  768b869bc84effce48a4cd7ac7a4ae858f869813 (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=d86be11b853ef01f6526d19f3bd24f65bec2d054
commit d86be11b853ef01f6526d19f3bd24f65bec2d054
Merge: 768b869 1ecc55a
Author:     Alexander Neundorf <neundorf at kde.org>
AuthorDate: Tue Nov 1 09:03:06 2011 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Nov 1 09:03:06 2011 -0400

    Merge topic 'DontCrashAutomocWithEmptyCompileDefs' into next
    
    1ecc55a Automoc: fix the fix, need to use std::string, not just char* pointer


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1ecc55aa7b95a487996654e81d6493e7b72961c0
commit 1ecc55aa7b95a487996654e81d6493e7b72961c0
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Tue Nov 1 13:59:14 2011 +0100
Commit:     Alex Neundorf <neundorf at kde.org>
CommitDate: Tue Nov 1 13:59:14 2011 +0100

    Automoc: fix the fix, need to use std::string, not just char* pointer
    
    We need to take a copy of the property values, since the returned
    char* pointer is reused by the following GetProperty() calls
    
    Alex

diff --git a/Source/cmQtAutomoc.cxx b/Source/cmQtAutomoc.cxx
index fdc19e4..e9cc9d1 100644
--- a/Source/cmQtAutomoc.cxx
+++ b/Source/cmQtAutomoc.cxx
@@ -124,18 +124,21 @@ void cmQtAutomoc::SetupAutomocTarget(cmTarget* target)
       }
     }
 
-  const char* _moc_incs = makefile->GetProperty("INCLUDE_DIRECTORIES");
-  const char* _moc_defs = makefile->GetProperty("DEFINITIONS");
-  const char* _moc_compile_defs = makefile->GetProperty("COMPILE_DEFINITIONS");
+  const char* tmp = makefile->GetProperty("INCLUDE_DIRECTORIES");
+  std::string _moc_incs = (tmp!=0 ? tmp : "");
+  tmp = makefile->GetProperty("DEFINITIONS");
+  std::string _moc_defs = (tmp!=0 ? tmp : "");
+  tmp = makefile->GetProperty("COMPILE_DEFINITIONS");
+  std::string _moc_compile_defs = (tmp!=0 ? tmp : "");
+
   // 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!=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_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_files", _moc_files.c_str());
   makefile->AddDefinition("_moc_headers", _moc_headers.c_str());
 

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

Summary of changes:
 Source/cmQtAutomoc.cxx |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list