summaryrefslogtreecommitdiffstats
path: root/Source/cmcmd.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-03-09 21:42:09 (GMT)
committerBrad King <brad.king@kitware.com>2017-03-21 14:02:33 (GMT)
commit24361a455a2a3bd904433ec3b0107493d29d98ba (patch)
tree48da0dd36e10d8f346e57969cffe11a48da0d723 /Source/cmcmd.cxx
parent845c482448e5b60f4934a48eea9c8c1e466f8fea (diff)
downloadCMake-24361a455a2a3bd904433ec3b0107493d29d98ba.zip
CMake-24361a455a2a3bd904433ec3b0107493d29d98ba.tar.gz
CMake-24361a455a2a3bd904433ec3b0107493d29d98ba.tar.bz2
bindexplib: Add support for parsing and integrating `.def` files
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r--Source/cmcmd.cxx15
1 files changed, 11 insertions, 4 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index 823b38f..9e08b9c 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -258,11 +258,18 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
<< "\n";
return 1;
}
- std::string objfile;
+ std::string file;
bindexplib deffile;
- while (cmSystemTools::GetLineFromStream(fin, objfile)) {
- if (!deffile.AddObjectFile(objfile.c_str())) {
- return 1;
+ while (cmSystemTools::GetLineFromStream(fin, file)) {
+ std::string const& ext = cmSystemTools::GetFilenameLastExtension(file);
+ if (cmSystemTools::LowerCase(ext) == ".def") {
+ if (!deffile.AddDefinitionFile(file.c_str())) {
+ return 1;
+ }
+ } else {
+ if (!deffile.AddObjectFile(file.c_str())) {
+ return 1;
+ }
}
}
deffile.WriteFile(fout);