diff options
author | Ken Martin <ken.martin@kitware.com> | 2003-06-20 17:56:51 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2003-06-20 17:56:51 (GMT) |
commit | 454c7ad2b6f2f02b5a3e9931ca77089efe398565 (patch) | |
tree | 97d59bded56aa634a83be0d366820d8104d4fc1a /Source/cmMakefile.cxx | |
parent | e9e312b4418b73f479073865147c4e19b9dacee0 (diff) | |
download | CMake-454c7ad2b6f2f02b5a3e9931ca77089efe398565.zip CMake-454c7ad2b6f2f02b5a3e9931ca77089efe398565.tar.gz CMake-454c7ad2b6f2f02b5a3e9931ca77089efe398565.tar.bz2 |
bug in not expanding variables for custom commands in targets
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 9cb35e2..a5cd730 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1173,6 +1173,7 @@ void cmMakefile::ExpandVariables() void cmMakefile::ExpandVariablesInCustomCommands() { + // do source files for(std::vector<cmSourceFile*>::iterator i = m_SourceFiles.begin(); i != m_SourceFiles.end(); ++i) { @@ -1182,6 +1183,28 @@ void cmMakefile::ExpandVariablesInCustomCommands() cc->ExpandVariables(*this); } } + + // now do targets + std::vector<cmCustomCommand>::iterator ic; + for (cmTargets::iterator l = m_Targets.begin(); + l != m_Targets.end(); l++) + { + for (ic = l->second.GetPreBuildCommands().begin(); + ic != l->second.GetPreBuildCommands().end(); ++ic) + { + ic->ExpandVariables(*this); + } + for (ic = l->second.GetPreLinkCommands().begin(); + ic != l->second.GetPreLinkCommands().end(); ++ic) + { + ic->ExpandVariables(*this); + } + for (ic = l->second.GetPostBuildCommands().begin(); + ic != l->second.GetPostBuildCommands().end(); ++ic) + { + ic->ExpandVariables(*this); + } + } } bool cmMakefile::IsOn(const char* name) const |