From 6fc4bfa11cf2c1de1c6c44704cd7c160f4363ea8 Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Fri, 29 May 2020 15:28:43 -0400 Subject: Ninja Multi-Config: Fix bug in CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS Fixes: #20775 --- Source/cmGeneratorTarget.cxx | 3 ++- Tests/RunCMake/NinjaMultiConfig/Simple.cmake | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 5828651..b4b0c45 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -2529,7 +2529,8 @@ void cmGeneratorTarget::ComputeModuleDefinitionInfo( info.DefFileGenerated = false; #endif if (info.DefFileGenerated) { - info.DefFile = this->ObjectDirectory /* has slash */ + "exports.def"; + info.DefFile = + this->GetObjectDirectory(config) /* has slash */ + "exports.def"; } else if (!info.Sources.empty()) { info.DefFile = info.Sources.front()->GetFullPath(); } diff --git a/Tests/RunCMake/NinjaMultiConfig/Simple.cmake b/Tests/RunCMake/NinjaMultiConfig/Simple.cmake index a32f551..3f4ecbe 100644 --- a/Tests/RunCMake/NinjaMultiConfig/Simple.cmake +++ b/Tests/RunCMake/NinjaMultiConfig/Simple.cmake @@ -1,5 +1,7 @@ enable_language(C) +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + file(TOUCH ${CMAKE_BINARY_DIR}/empty.cmake) include(${CMAKE_BINARY_DIR}/empty.cmake) -- cgit v0.12