diff options
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r-- | Source/cmcmd.cxx | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 823b38f..dc267e7 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); @@ -576,7 +583,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args) std::cerr << "-E capabilities accepts no additional arguments\n"; return 1; } - cmake cm; + cmake cm(cmake::RoleInternal); #if defined(HAVE_SERVER_MODE) && HAVE_SERVER_MODE std::cout << cm.ReportCapabilities(true); #else @@ -753,7 +760,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args) const bool verbose = isCMakeVerbose(); // Create a cmake object instance to process dependencies. - cmake cm; + cmake cm(cmake::RoleScript); // All we need is the `set` command. std::string gen; std::string homeDir; std::string startDir; @@ -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); } |