summaryrefslogtreecommitdiffstats
path: root/Source/cmcmd.cxx
diff options
context:
space:
mode:
authorZsolt Parragi <zsolt.parragi@cancellar.hu>2019-08-13 12:29:48 (GMT)
committerBrad King <brad.king@kitware.com>2019-08-30 15:30:38 (GMT)
commitc856d4556b4ec28cb818ef3c7aca1e4a30e0499d (patch)
treeaf46514551c74f62952d3d2d5cf2ca34171f9a1c /Source/cmcmd.cxx
parent079b8e29168dc081f37f79f3577a5c0690bb7051 (diff)
downloadCMake-c856d4556b4ec28cb818ef3c7aca1e4a30e0499d.zip
CMake-c856d4556b4ec28cb818ef3c7aca1e4a30e0499d.tar.gz
CMake-c856d4556b4ec28cb818ef3c7aca1e4a30e0499d.tar.bz2
bindexplib: supporting llvm bitcode formats using llvm-nm
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r--Source/cmcmd.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index 2be8bae..08cad7d 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -558,8 +558,8 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string> const& args)
#if defined(_WIN32) && !defined(CMAKE_BOOTSTRAP)
else if (args[1] == "__create_def") {
if (args.size() < 4) {
- std::cerr
- << "__create_def Usage: -E __create_def outfile.def objlistfile\n";
+ std::cerr << "__create_def Usage: -E __create_def outfile.def "
+ "objlistfile [-nm=nm-path]\n";
return 1;
}
FILE* fout = cmsys::SystemTools::Fopen(args[2].c_str(), "w+");
@@ -576,6 +576,15 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string> const& args)
}
std::string file;
bindexplib deffile;
+ if (args.size() >= 5) {
+ auto a = args[4];
+ if (cmHasLiteralPrefix(a, "--nm=")) {
+ deffile.SetNmPath(a.substr(5));
+ std::cerr << a.substr(5) << "\n";
+ } else {
+ std::cerr << "unknown argument: " << a << "\n";
+ }
+ }
while (cmSystemTools::GetLineFromStream(fin, file)) {
std::string const& ext = cmSystemTools::GetFilenameLastExtension(file);
if (cmSystemTools::LowerCase(ext) == ".def") {