diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2015-11-16 20:31:10 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-11-18 15:02:48 (GMT) |
commit | 1c1ace2db012919f23b6de5400ab192b9277dfc6 (patch) | |
tree | b501ccdff182a3c16ef419cf27d8da66993a87dd /Source/cmcmd.cxx | |
parent | 30b0db7bb5482258ccdb96d2f0b7aadb5d3b23ac (diff) | |
download | CMake-1c1ace2db012919f23b6de5400ab192b9277dfc6.zip CMake-1c1ace2db012919f23b6de5400ab192b9277dfc6.tar.gz CMake-1c1ace2db012919f23b6de5400ab192b9277dfc6.tar.bz2 |
De-duplicate symbols listed in generated module definition files
MS tools have a limit on the number of symbols that can be listed
in a `.def` file. If multiple `.obj` files provide a symbol then
avoid listing it more than once in the generated `.def` file to
avoid counting toward the limit.
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r-- | Source/cmcmd.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index be492ed..54a1590 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -35,8 +35,7 @@ #include <stdlib.h> // required for atoi #if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) -// defined in binexplib.cxx -bool DumpFile(const char* filename, FILE *fout); +#include "bindexplib.h" #endif void CMakeCommandUsage(const char* program) @@ -240,13 +239,16 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args) return 1; } std::string objfile; + bindexplib deffile; while(cmSystemTools::GetLineFromStream(fin, objfile)) { - if (!DumpFile(objfile.c_str(), fout)) + if( !deffile.AddObjectFile(objfile.c_str())) { return 1; } } + deffile.WriteFile(fout); + fclose(fout); return 0; } #endif |