|
@@ -1386,27 +1386,19 @@ bool cmQtAutoGenInitializer::InitAutogenTarget()
|
|
|
const auto timestampTargetName =
|
|
|
cmStrCat(this->GenTarget->GetName(), "_autogen_timestamp_deps");
|
|
|
|
|
|
- // Add additional autogen target dependencies to
|
|
|
- // '_autogen_timestamp_deps'.
|
|
|
- for (const cmTarget* t : this->AutogenTarget.DependTargets) {
|
|
|
- std::string depname = t->GetName();
|
|
|
- if (t->IsImported()) {
|
|
|
- auto const ttype = t->GetType();
|
|
|
- if (ttype == cmStateEnums::TargetType::STATIC_LIBRARY ||
|
|
|
- ttype == cmStateEnums::TargetType::SHARED_LIBRARY ||
|
|
|
- ttype == cmStateEnums::TargetType::UNKNOWN_LIBRARY) {
|
|
|
- depname = cmStrCat("$<TARGET_LINKER_FILE:", t->GetName(), ">");
|
|
|
- }
|
|
|
- }
|
|
|
- dependencies.emplace_back(std::move(depname));
|
|
|
- }
|
|
|
-
|
|
|
auto cc = cm::make_unique<cmCustomCommand>();
|
|
|
cc->SetWorkingDirectory(this->Dir.Work.c_str());
|
|
|
cc->SetDepends(dependencies);
|
|
|
cc->SetEscapeOldStyle(false);
|
|
|
cmTarget* timestampTarget = this->LocalGen->AddUtilityCommand(
|
|
|
timestampTargetName, true, std::move(cc));
|
|
|
+
|
|
|
+ // Add additional autogen target dependencies to
|
|
|
+ // '_autogen_timestamp_deps'.
|
|
|
+ for (const cmTarget* t : this->AutogenTarget.DependTargets) {
|
|
|
+ timestampTarget->AddUtility(t->GetName(), false, this->Makefile);
|
|
|
+ }
|
|
|
+
|
|
|
auto const isMake =
|
|
|
this->GlobalGen->GetName().find("Make") != std::string::npos;
|
|
|
if (this->AutogenTarget.DependOrigin && isMake) {
|