summaryrefslogtreecommitdiffstats
path: root/Source/cmAddExecutableCommand.cxx
diff options
context:
space:
mode:
authorSebastien Barre <sebastien.barre@kitware.com>2001-11-01 18:09:08 (GMT)
committerSebastien Barre <sebastien.barre@kitware.com>2001-11-01 18:09:08 (GMT)
commit63cb6c7407539ff67292a384a38c5ab9bbf107a4 (patch)
treed331d0dc551722ed46151f0d83fae4b9da9c03cf /Source/cmAddExecutableCommand.cxx
parent10ae8a4e249548ab3a2ea223d9bbc4dee1107a9d (diff)
downloadCMake-63cb6c7407539ff67292a384a38c5ab9bbf107a4.zip
CMake-63cb6c7407539ff67292a384a38c5ab9bbf107a4.tar.gz
CMake-63cb6c7407539ff67292a384a38c5ab9bbf107a4.tar.bz2
Expand vars in exe and lib name
Diffstat (limited to 'Source/cmAddExecutableCommand.cxx')
-rw-r--r--Source/cmAddExecutableCommand.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/cmAddExecutableCommand.cxx b/Source/cmAddExecutableCommand.cxx
index b1ce21f..504e53c 100644
--- a/Source/cmAddExecutableCommand.cxx
+++ b/Source/cmAddExecutableCommand.cxx
@@ -51,17 +51,21 @@ bool cmAddExecutableCommand::InitialPass(std::vector<std::string> const& args)
}
std::vector<std::string>::const_iterator s = args.begin();
+
+ std::string exename = *s;
+ m_Makefile->ExpandVariablesInString(exename);
+
++s;
if (*s == "WIN32")
{
++s;
std::vector<std::string> srclists(s, args.end());
- m_Makefile->AddExecutable(args[0].c_str(),srclists, true);
+ m_Makefile->AddExecutable(exename.c_str(),srclists, true);
}
else
{
std::vector<std::string> srclists(s, args.end());
- m_Makefile->AddExecutable(args[0].c_str(),srclists, false);
+ m_Makefile->AddExecutable(exename.c_str(),srclists, false);
}
return true;