summaryrefslogtreecommitdiff
path: root/Source/cmAddExecutableCommand.cxx
diff options
context:
space:
mode:
authorAlex Neundorf <neundorf@kde.org>2011-08-16 01:27:30 +0200
committerAlex Neundorf <neundorf@kde.org>2011-08-16 01:27:30 +0200
commitc27607baf860b6c57db84f21a298ad8257ff7153 (patch)
tree45a21e677e53e01c201a142f8c46777adf4f255f /Source/cmAddExecutableCommand.cxx
parent24d9b7d7452bfd9b3d7cea670a3a5a2e9f5b2f16 (diff)
downloadcmake-c27607baf860b6c57db84f21a298ad8257ff7153.tar.gz
Refactor SetupAutomocTarget() so it can be run after creating the target
This makes it easier to move it from InitialPass() to some other location, e.g. FinalPass() or something else. Alex
Diffstat (limited to 'Source/cmAddExecutableCommand.cxx')
-rw-r--r--Source/cmAddExecutableCommand.cxx15
1 files changed, 3 insertions, 12 deletions
diff --git a/Source/cmAddExecutableCommand.cxx b/Source/cmAddExecutableCommand.cxx
index 9710d20527..ef75b3b06f 100644
--- a/Source/cmAddExecutableCommand.cxx
+++ b/Source/cmAddExecutableCommand.cxx
@@ -126,14 +126,6 @@ bool cmAddExecutableCommand
}
std::vector<std::string> srclists(s, args.end());
- cmQtAutomoc* automoc = 0;
- if ( doAutomoc )
- {
- automoc = new cmQtAutomoc;
- automoc->SetupAutomocTarget(this->Makefile, exename.c_str(), srclists);
- }
-
-
cmTarget* tgt = this->Makefile->AddExecutable(exename.c_str(), srclists,
excludeFromAll);
if ( use_win32 )
@@ -145,11 +137,10 @@ bool cmAddExecutableCommand
tgt->SetProperty("MACOSX_BUNDLE", "ON");
}
- if ( automoc )
+ if ( doAutomoc )
{
- automoc->AddTargetDependency(this->Makefile, tgt);
- delete automoc;
- automoc = 0;
+ cmQtAutomoc automoc;
+ automoc.SetupAutomocTarget(tgt);
}
return true;