diff options
author | Yury Zhuravlev <stalkerg@gmail.com> | 2016-07-10 17:24:43 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-07-11 13:41:04 (GMT) |
commit | 9da725cb00d25c7d3f45e8ee8c943ec5241d6227 (patch) | |
tree | d8ac9317dc0b460557c119180fdd04d4bff0da55 /Source/cmLocalVisualStudio7Generator.cxx | |
parent | 2005b960672d2d552585805ea398b02400a576b7 (diff) | |
download | CMake-9da725cb00d25c7d3f45e8ee8c943ec5241d6227.zip CMake-9da725cb00d25c7d3f45e8ee8c943ec5241d6227.tar.gz CMake-9da725cb00d25c7d3f45e8ee8c943ec5241d6227.tar.bz2 |
Windows: Honor WINDOWS_EXPORT_ALL_SYMBOLS for executables with exports
For executables with ENABLE_EXPORTS set, export all symbols when
instructed to do so by WINDOWS_EXPORT_ALL_SYMBOLS.
Diffstat (limited to 'Source/cmLocalVisualStudio7Generator.cxx')
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index c38e99c..e72abe9 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -1013,7 +1013,8 @@ void cmLocalVisualStudio7Generator::OutputBuildTool( linkOptions.AddFlag("ModuleDefinitionFile", defFile.c_str()); } - if (target->GetType() == cmState::SHARED_LIBRARY && + if ((target->GetType() == cmState::SHARED_LIBRARY || + target->IsExecutableWithExports()) && this->Makefile->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS")) { if (target->GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS")) { linkOptions.AddFlag("ModuleDefinitionFile", "$(IntDir)/exportall.def"); @@ -1836,7 +1837,8 @@ void cmLocalVisualStudio7Generator::OutputTargetRules( tool = this->FortranProject ? "VFPreLinkEventTool" : "VCPreLinkEventTool"; event.Start(tool); bool addedPrelink = false; - if (target->GetType() == cmState::SHARED_LIBRARY && + if ((target->GetType() == cmState::SHARED_LIBRARY || + target->IsExecutableWithExports()) && this->Makefile->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS")) { if (target->GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS")) { addedPrelink = true; |