mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-04 13:19:51 -05:00
MSVC: Define _WINDLL consistently for shared libraries
Visual Studio defines this automatically for `.dll` targets. For consistency, define it when compiling for the MSVC ABI with other generators. Add policy CMP0203 for compatibility. Fixes: #27253
This commit is contained in:
@@ -1859,6 +1859,10 @@ std::set<BT<std::string>> cmLocalGenerator::GetTargetDefines(
|
||||
if (std::string const* exportMacro = target->GetExportMacro()) {
|
||||
this->AppendDefines(defines, *exportMacro);
|
||||
}
|
||||
for (auto const& sharedLibCompileDef :
|
||||
target->GetSharedLibraryCompileDefs(config)) {
|
||||
this->AppendDefines(defines, sharedLibCompileDef);
|
||||
}
|
||||
|
||||
// Add preprocessor definitions for this target and configuration.
|
||||
std::vector<BT<std::string>> targetDefines =
|
||||
|
||||
Reference in New Issue
Block a user