diff options
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r-- | Source/cmcmd.cxx | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 823b38f..cc954e6 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -32,12 +32,12 @@ #include "cmVisualStudioWCEPlatformParser.h" #endif +#include "cmConfigure.h" +#include "cmsys/Directory.hxx" +#include "cmsys/FStream.hxx" +#include "cmsys/Process.h" +#include "cmsys/Terminal.h" #include <algorithm> -#include <cmConfigure.h> -#include <cmsys/Directory.hxx> -#include <cmsys/FStream.hxx> -#include <cmsys/Process.h> -#include <cmsys/Terminal.h> #include <iostream> #include <sstream> #include <stdio.h> @@ -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); @@ -1443,7 +1450,8 @@ bool cmVSLink::Parse(std::vector<std::string>::const_iterator argBeg, if (*arg == "--") { ++arg; break; - } else if (*arg == "--manifests") { + } + if (*arg == "--manifests") { for (++arg; arg != argEnd && !cmHasLiteralPrefix(*arg, "-"); ++arg) { this->UserManifests.push_back(*arg); } |