summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaNormalTargetGenerator.cxx
diff options
context:
space:
mode:
authorYury Zhuravlev <stalkerg@gmail.com>2016-07-10 17:24:43 (GMT)
committerBrad King <brad.king@kitware.com>2016-07-11 13:41:04 (GMT)
commit9da725cb00d25c7d3f45e8ee8c943ec5241d6227 (patch)
treed8ac9317dc0b460557c119180fdd04d4bff0da55 /Source/cmNinjaNormalTargetGenerator.cxx
parent2005b960672d2d552585805ea398b02400a576b7 (diff)
downloadCMake-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/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 77d3901..81a1618 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -472,7 +472,8 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
vars["FLAGS"], vars["LINK_FLAGS"], frameworkPath,
linkPath, &genTarget, useWatcomQuote);
if (this->GetMakefile()->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS") &&
- gt.GetType() == cmState::SHARED_LIBRARY) {
+ (gt.GetType() == cmState::SHARED_LIBRARY ||
+ gt.IsExecutableWithExports())) {
if (gt.GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS")) {
std::string name_of_def_file = gt.GetSupportDirectory();
name_of_def_file += "/" + gt.GetName();
@@ -599,7 +600,8 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
}
// maybe create .def file from list of objects
- if (gt.GetType() == cmState::SHARED_LIBRARY &&
+ if ((gt.GetType() == cmState::SHARED_LIBRARY ||
+ gt.IsExecutableWithExports()) &&
this->GetMakefile()->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS")) {
if (gt.GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS")) {
std::string cmakeCommand =