diff options
author | Sebastien Barre <sebastien.barre@kitware.com> | 2001-11-08 15:40:05 (GMT) |
---|---|---|
committer | Sebastien Barre <sebastien.barre@kitware.com> | 2001-11-08 15:40:05 (GMT) |
commit | 340b1f1d8b66b62e4b9da1c766f38268187e0d98 (patch) | |
tree | 30d6e78544bf2290f64a04037198d0c28df0a1f2 /Source/cmSourceFilesCommand.cxx | |
parent | 229b9064d1931b8b68b737ce13df5a4af3b53712 (diff) | |
download | CMake-340b1f1d8b66b62e4b9da1c766f38268187e0d98.zip CMake-340b1f1d8b66b62e4b9da1c766f38268187e0d98.tar.gz CMake-340b1f1d8b66b62e4b9da1c766f38268187e0d98.tar.bz2 |
Expand var in name too
Diffstat (limited to 'Source/cmSourceFilesCommand.cxx')
-rw-r--r-- | Source/cmSourceFilesCommand.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/cmSourceFilesCommand.cxx b/Source/cmSourceFilesCommand.cxx index 6795b84..53d4602 100644 --- a/Source/cmSourceFilesCommand.cxx +++ b/Source/cmSourceFilesCommand.cxx @@ -43,11 +43,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // cmSourceFilesCommand bool cmSourceFilesCommand::InitialPass(std::vector<std::string> const& args) { - if(args.size() < 1 ) + if(args.size() < 1 ) { this->SetError("called with incorrect number of arguments"); return false; } + + std::string name = args[0]; + m_Makefile->ExpandVariablesInString(name); + for(std::vector<std::string>::const_iterator i = (args.begin() + 1); i != args.end(); ++i) { @@ -71,7 +75,7 @@ bool cmSourceFilesCommand::InitialPass(std::vector<std::string> const& args) m_Makefile->GetSourceExtensions(), m_Makefile->GetHeaderExtensions()); } - m_Makefile->AddSource(file, args[0].c_str()); + m_Makefile->AddSource(file, name.c_str()); } return true; } |