diff options
author | Alex Neundorf <neundorf@kde.org> | 2012-09-30 16:34:57 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-11-06 16:54:58 (GMT) |
commit | 05f162ce9571d1ec7dee6f4c4b76126526247b14 (patch) | |
tree | 79071ee674bf7d74475c68a2ee946a8083ffc454 /Source/cmLocalUnixMakefileGenerator3.cxx | |
parent | c66f03adf93fc402141ed5dc17d39bae1af3bbfd (diff) | |
download | CMake-05f162ce9571d1ec7dee6f4c4b76126526247b14.zip CMake-05f162ce9571d1ec7dee6f4c4b76126526247b14.tar.gz CMake-05f162ce9571d1ec7dee6f4c4b76126526247b14.tar.bz2 |
AddCustomCommand: Handle multiple IMPLICIT_DEPENDS files (#10048)
The code handling IMPLICIT_DEPENDS was only able to track a single file,
the latest file replaced earlier files in the list.
The documentation now mentions that the language has to be prefixed to
every file and the test now uses two implicit dependencies, where only
the second is modified to trigger re-running of the custom command.
Alex
Inspired-by: Michael Wild <themiwi@users.sourceforge.net>
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index db93529..820d25a 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -1939,8 +1939,12 @@ void cmLocalUnixMakefileGenerator3 for(ImplicitDependFileMap::const_iterator pi = implicitPairs.begin(); pi != implicitPairs.end(); ++pi) { - cmakefileStream << " \"" << pi->second << "\" "; - cmakefileStream << "\"" << pi->first << "\"\n"; + for(cmDepends::DependencyVector::const_iterator di = pi->second.begin(); + di != pi->second.end(); ++ di) + { + cmakefileStream << " \"" << *di << "\" "; + cmakefileStream << "\"" << pi->first << "\"\n"; + } } cmakefileStream << " )\n"; @@ -2204,7 +2208,7 @@ cmLocalUnixMakefileGenerator3::AddImplicitDepends(cmTarget const& tgt, const char* obj, const char* src) { - this->ImplicitDepends[tgt.GetName()][lang][obj] = src; + this->ImplicitDepends[tgt.GetName()][lang][obj].push_back(src); } //---------------------------------------------------------------------------- |