mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-27 11:18:35 -06:00
Ninja,Makefile: Move builtin linker flags to <LINK_FLAGS> placeholder
Previously we used separate placeholders for builtin linker flags: * CMAKE_<LANG>_LINK_FLAGS for EXECUTABLEs * CMAKE_SHARED_LIBRARY_CREATE_<LANG>_FLAGS for SHARED libraries * CMAKE_SHARED_MODULE_CREATE_<LANG>_FLAGS for MODULE libraries These correspond to variables set by our compiler information modules. Teach the generators to look up these variables and add them to the existing `<LINK_FLAGS>` placeholder instead. Substitute the empty string for the old placeholders. Issue: #21934
This commit is contained in:
@@ -371,6 +371,8 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
|
||||
std::string linkFlags;
|
||||
|
||||
// Add flags to create an executable.
|
||||
this->LocalGenerator->AppendTargetCreationLinkFlags(
|
||||
linkFlags, this->GeneratorTarget, linkLanguage);
|
||||
this->LocalGenerator->AddConfigVariableFlags(
|
||||
linkFlags, "CMAKE_EXE_LINKER_FLAGS", this->GeneratorTarget,
|
||||
cmBuildStep::Link, linkLanguage, this->GetConfigName());
|
||||
|
||||
Reference in New Issue
Block a user