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 75e20696418f67eb2517bd078b23ce0764cfc218 (commit) via b5bc8ecf32678ab44f6a7db2925e4da3556adc6a (commit) from 5d1e23a59ea0beb128114e89a4907fa9daf03604 (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=75e20696418f67eb2517bd078b23ce0764cfc218 commit 75e20696418f67eb2517bd078b23ce0764cfc218 Merge: 5d1e23a b5bc8ec Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Mar 6 09:49:51 2014 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Thu Mar 6 09:49:51 2014 -0500 Merge topic 'fix-Qt4-moc-command-depends' into next b5bc8ecf Revert topic 'fix-Qt4-moc-command-depends' http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b5bc8ecf32678ab44f6a7db2925e4da3556adc6a commit b5bc8ecf32678ab44f6a7db2925e4da3556adc6a Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Mar 6 09:49:04 2014 -0500 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Mar 6 09:49:12 2014 -0500 Revert topic 'fix-Qt4-moc-command-depends' It needs to be revised to do a dependency-union only when tracing dependencies. diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake index 2caa2bf..df2318b 100644 --- a/Modules/Qt4Macros.cmake +++ b/Modules/Qt4Macros.cmake @@ -141,7 +141,7 @@ macro (QT4_CREATE_MOC_COMMAND infile outfile moc_flags moc_options moc_target) set(_moc_extra_parameters_file @${_moc_parameters_file}) add_custom_command(OUTPUT ${outfile} COMMAND Qt4::moc ${_moc_extra_parameters_file} - DEPENDS ${infile} ${_moc_parameters_file} + DEPENDS ${infile} ${_moc_working_dir} VERBATIM) endmacro () diff --git a/Source/cmCustomCommand.cxx b/Source/cmCustomCommand.cxx index 7c2ab38..b672148 100644 --- a/Source/cmCustomCommand.cxx +++ b/Source/cmCustomCommand.cxx @@ -15,16 +15,12 @@ #include <cmsys/auto_ptr.hxx> -#include <assert.h> -#include <cmGeneratorExpression.h> - //---------------------------------------------------------------------------- cmCustomCommand::cmCustomCommand() { this->HaveComment = false; this->EscapeOldStyle = true; this->EscapeAllowMakeVars = false; - this->Makefile = 0; } //---------------------------------------------------------------------------- @@ -37,8 +33,7 @@ cmCustomCommand::cmCustomCommand(const cmCustomCommand& r): WorkingDirectory(r.WorkingDirectory), EscapeAllowMakeVars(r.EscapeAllowMakeVars), EscapeOldStyle(r.EscapeOldStyle), - Backtrace(new cmListFileBacktrace(*r.Backtrace)), - Makefile(r.Makefile) + Backtrace(new cmListFileBacktrace(*r.Backtrace)) { } @@ -64,7 +59,6 @@ cmCustomCommand& cmCustomCommand::operator=(cmCustomCommand const& r) newBacktrace(new cmListFileBacktrace(*r.Backtrace)); delete this->Backtrace; this->Backtrace = newBacktrace.release(); - this->Makefile = r.Makefile; return *this; } @@ -84,8 +78,7 @@ cmCustomCommand::cmCustomCommand(cmMakefile const* mf, WorkingDirectory(workingDirectory?workingDirectory:""), EscapeAllowMakeVars(false), EscapeOldStyle(true), - Backtrace(new cmListFileBacktrace), - Makefile(mf) + Backtrace(new cmListFileBacktrace) { this->EscapeOldStyle = true; this->EscapeAllowMakeVars = false; @@ -118,53 +111,9 @@ const char* cmCustomCommand::GetWorkingDirectory() const } //---------------------------------------------------------------------------- -void cmCustomCommand::GetConfigDepends(const char* config, - std::set<std::string>& emitted) const -{ - for(std::vector<std::string>::const_iterator di = this->Depends.begin(); - di != this->Depends.end(); ++di) - { - cmGeneratorExpression ge(*this->Backtrace); - std::vector<std::string> results; - cmSystemTools::ExpandListArgument( - ge.Parse(*di)->Evaluate(const_cast<cmMakefile*>(this->Makefile), - config), results); - for(std::vector<std::string>::const_iterator ri = results.begin(); - ri != results.end(); ++ri) - { - if (emitted.insert(*ri).second) - { - this->DependsResult.push_back(*ri); - } - } - } -} - -//---------------------------------------------------------------------------- const std::vector<std::string>& cmCustomCommand::GetDepends() const { - if (this->DependsResult.empty()) - { - if(!this->Makefile) - { - return this->DependsResult; - } - std::set<std::string> emitted; - std::vector<std::string> configs; - this->Makefile->GetConfigurations(configs); - - if (configs.empty()) - { - this->GetConfigDepends(0, emitted); - } - - for(std::vector<std::string>::const_iterator ci = configs.begin(); - ci != configs.end(); ++ci) - { - this->GetConfigDepends(ci->c_str(), emitted); - } - } - return this->DependsResult; + return this->Depends; } //---------------------------------------------------------------------------- diff --git a/Source/cmCustomCommand.h b/Source/cmCustomCommand.h index 85fb888..6851105 100644 --- a/Source/cmCustomCommand.h +++ b/Source/cmCustomCommand.h @@ -79,12 +79,8 @@ public: ImplicitDependsList const& GetImplicitDepends() const; private: - void GetConfigDepends(const char* config, - std::set<std::string>& emitted) const; - std::vector<std::string> Outputs; std::vector<std::string> Depends; - mutable std::vector<std::string> DependsResult; cmCustomCommandLines CommandLines; bool HaveComment; std::string Comment; @@ -93,7 +89,6 @@ private: bool EscapeOldStyle; cmListFileBacktrace* Backtrace; ImplicitDependsList ImplicitDepends; - cmMakefile const* Makefile; }; #endif diff --git a/Tests/Qt4Targets/CMakeLists.txt b/Tests/Qt4Targets/CMakeLists.txt index 60954a2..af9fc3f 100644 --- a/Tests/Qt4Targets/CMakeLists.txt +++ b/Tests/Qt4Targets/CMakeLists.txt @@ -36,24 +36,3 @@ add_executable(Qt4WrapMacroTest WIN32 main_wrap_test.cpp ${moc_file}) set_property(TARGET Qt4WrapMacroTest PROPERTY AUTOMOC OFF) target_include_directories(Qt4WrapMacroTest PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/interface") target_link_libraries(Qt4WrapMacroTest Qt4::QtGui) - -set(timeformat "%Y%j%H%M%S") -file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/IncrementalMocBuild") -execute_process(COMMAND "${CMAKE_COMMAND}" -DADD_DEF=0 "-H${CMAKE_CURRENT_SOURCE_DIR}/IncrementalMoc" "-B${CMAKE_CURRENT_BINARY_DIR}/IncrementalMocBuild" "-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}") -execute_process(COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_CURRENT_BINARY_DIR}/IncrementalMocBuild") -file(TIMESTAMP "${CMAKE_CURRENT_BINARY_DIR}/IncrementalMocBuild/moc_foo.cpp" tsvar_before "${timeformat}") -if (NOT tsvar_before) - message(SEND_ERROR "Unable to read timestamp from moc file from first build!") -endif() - -execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 1) # Ensure that at least a second passes. -execute_process(COMMAND "${CMAKE_COMMAND}" -DADD_DEF=1 "${CMAKE_CURRENT_BINARY_DIR}/IncrementalMocBuild" "-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}") -execute_process(COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_CURRENT_BINARY_DIR}/IncrementalMocBuild") -file(TIMESTAMP "${CMAKE_CURRENT_BINARY_DIR}/IncrementalMocBuild/moc_foo.cpp" tsvar_after "${timeformat}") -if (NOT tsvar_after) - message(SEND_ERROR "Unable to read timestamp from moc file from first build!") -endif() - -if (NOT tsvar_after GREATER tsvar_before) - message(SEND_ERROR "Rebuild did not re-create moc file. Before: ${tsvar_before}. After: ${tsvar_after}") -endif() diff --git a/Tests/Qt4Targets/IncrementalMoc/CMakeLists.txt b/Tests/Qt4Targets/IncrementalMoc/CMakeLists.txt deleted file mode 100644 index 4ba0ced..0000000 --- a/Tests/Qt4Targets/IncrementalMoc/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ - -cmake_minimum_required(VERSION 2.8.12) -project(IncrementalMoc) - -find_package(Qt4 REQUIRED) - -qt4_generate_moc(foo.h moc_foo.cpp) - -add_library(testlib foo.cpp moc_foo.cpp) -target_link_libraries(testlib Qt4::QtCore) -if (ADD_DEF) - target_compile_definitions(testlib PRIVATE NEW_DEF) -endif() diff --git a/Tests/Qt4Targets/IncrementalMoc/foo.cpp b/Tests/Qt4Targets/IncrementalMoc/foo.cpp deleted file mode 100644 index e924f7e..0000000 --- a/Tests/Qt4Targets/IncrementalMoc/foo.cpp +++ /dev/null @@ -1,8 +0,0 @@ - -#include "foo.h" - -Foo::Foo() - : QObject(0) -{ - -} diff --git a/Tests/Qt4Targets/IncrementalMoc/foo.h b/Tests/Qt4Targets/IncrementalMoc/foo.h deleted file mode 100644 index 38d899f..0000000 --- a/Tests/Qt4Targets/IncrementalMoc/foo.h +++ /dev/null @@ -1,9 +0,0 @@ - -#include <QObject> - -class Foo : QObject -{ - Q_OBJECT -public: - Foo(); -}; ----------------------------------------------------------------------- Summary of changes: Modules/Qt4Macros.cmake | 2 +- Source/cmCustomCommand.cxx | 57 ++---------------------- Source/cmCustomCommand.h | 5 --- Tests/Qt4Targets/CMakeLists.txt | 21 --------- Tests/Qt4Targets/IncrementalMoc/CMakeLists.txt | 13 ------ Tests/Qt4Targets/IncrementalMoc/foo.cpp | 8 ---- Tests/Qt4Targets/IncrementalMoc/foo.h | 9 ---- 7 files changed, 4 insertions(+), 111 deletions(-) delete mode 100644 Tests/Qt4Targets/IncrementalMoc/CMakeLists.txt delete mode 100644 Tests/Qt4Targets/IncrementalMoc/foo.cpp delete mode 100644 Tests/Qt4Targets/IncrementalMoc/foo.h hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits