mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-20 21:40:15 +08:00
bindexplib: Add support for parsing and integrating .def
files
This commit is contained in:
@@ -258,12 +258,19 @@ 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())) {
|
||||
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);
|
||||
fclose(fout);
|
||||
|
Reference in New Issue
Block a user