mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 00:11:07 -06:00
Ninja: Escape SONAME on linker command line
If the shared object name contains spaces, they need to be properly
escaped, or link command will fail.
This was already done for soname symlink creation in commit 13c92b4a30
(Ninja: Fix creation of library symlinks in folders with spaces,
2019-05-20, v3.15.0-rc1~87^2).
Fixes: #20331
This commit is contained in:
committed by
Brad King
parent
9dfa7981d5
commit
c0a3317497
@@ -868,7 +868,8 @@ void cmNinjaNormalTargetGenerator::WriteNvidiaDeviceLinkStatement(
|
||||
if (genTarget->HasSOName(config)) {
|
||||
vars["SONAME_FLAG"] =
|
||||
this->GetMakefile()->GetSONameFlag(this->TargetLinkLanguage(config));
|
||||
vars["SONAME"] = tgtNames.SharedObject;
|
||||
vars["SONAME"] = localGen.ConvertToOutputFormat(tgtNames.SharedObject,
|
||||
cmOutputConverter::SHELL);
|
||||
if (genTarget->GetType() == cmStateEnums::SHARED_LIBRARY) {
|
||||
std::string install_dir =
|
||||
this->GetGeneratorTarget()->GetInstallNameDirForBuildTree(config);
|
||||
@@ -1176,7 +1177,8 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement(
|
||||
}
|
||||
if (gt->HasSOName(config)) {
|
||||
vars["SONAME_FLAG"] = mf->GetSONameFlag(this->TargetLinkLanguage(config));
|
||||
vars["SONAME"] = tgtNames.SharedObject;
|
||||
vars["SONAME"] = localGen.ConvertToOutputFormat(tgtNames.SharedObject,
|
||||
cmOutputConverter::SHELL);
|
||||
if (targetType == cmStateEnums::SHARED_LIBRARY) {
|
||||
std::string install_dir = gt->GetInstallNameDirForBuildTree(config);
|
||||
if (!install_dir.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user