diff options
author | Brad King <brad.king@kitware.com> | 2017-03-09 20:56:30 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-03-09 21:25:15 (GMT) |
commit | f36eaf6a6eb8a7ef1127ad43e419896be89f0e39 (patch) | |
tree | d51a6a1ab0d1c894137b71f2c2b732cb7f238a32 /Source/cmGeneratorTarget.cxx | |
parent | 25d261efa7c80ce7d9cbcb8b94d5d4a77cb12aaf (diff) | |
download | CMake-f36eaf6a6eb8a7ef1127ad43e419896be89f0e39.zip CMake-f36eaf6a6eb8a7ef1127ad43e419896be89f0e39.tar.gz CMake-f36eaf6a6eb8a7ef1127ad43e419896be89f0e39.tar.bz2 |
Refactor WINDOWS_EXPORT_ALL_SYMBOLS implementation
Use `cmGeneratorTarget::ModuleDefinitionInfo` to combine the
implementation of `WINDOWS_EXPORT_ALL_SYMBOLS` with that of using a
`.def` file as a source. Only one of these could be used within a
single target before anyway.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index acaa383..29698cf 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -1975,7 +1975,12 @@ void cmGeneratorTarget::ComputeModuleDefinitionInfo( { std::vector<cmSourceFile const*> sources; this->GetModuleDefinitionSources(sources, config); - if (!sources.empty()) { + info.WindowsExportAllSymbols = + this->Makefile->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS") && + this->GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS"); + if (info.WindowsExportAllSymbols) { + info.DefFile = this->ObjectDirectory /* has slash */ + "exports.def"; + } else if (!sources.empty()) { info.DefFile = sources.front()->GetFullPath(); } } |