summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-03-05 14:00:18 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-03-05 14:00:30 (GMT)
commitb39a9dd897f3062273acb4d2ea3dbf4d9c7343c3 (patch)
tree88453fc92fbbe6d0591a7909803a5bfb3a7c34cb
parent2fbd77124e4990a381143f0351b1caed12db5107 (diff)
parent1ac042aa67c0e0ab531cd38977cb2f65fd96ed4b (diff)
downloadCMake-b39a9dd897f3062273acb4d2ea3dbf4d9c7343c3.zip
CMake-b39a9dd897f3062273acb4d2ea3dbf4d9c7343c3.tar.gz
CMake-b39a9dd897f3062273acb4d2ea3dbf4d9c7343c3.tar.bz2
Merge topic 'def-generate-windows-only'
1ac042aa67 Do not generate rules for .def generation where not supported Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1809
-rw-r--r--Source/cmGeneratorTarget.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index e9b6daf..abbc3d0 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -1999,8 +1999,13 @@ void cmGeneratorTarget::ComputeModuleDefinitionInfo(
info.WindowsExportAllSymbols =
this->Makefile->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS") &&
this->GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS");
+#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE)
info.DefFileGenerated =
info.WindowsExportAllSymbols || info.Sources.size() > 1;
+#else
+ // Our __create_def helper is only available on Windows.
+ info.DefFileGenerated = false;
+#endif
if (info.DefFileGenerated) {
info.DefFile = this->ObjectDirectory /* has slash */ + "exports.def";
} else if (!info.Sources.empty()) {