cmGeneratorTarget: Fix regression in CUDA device link options
Since commit f69d1872db
(cmGeneratorTarget: Add caches to some
functions, 2022-11-23) we cache the computed link options for a target.
Cache the host and device link options separately.
This commit is contained in:
parent
f69d1872db
commit
7c63372c22
@ -4651,7 +4651,8 @@ void cmGeneratorTarget::GetLinkOptions(std::vector<std::string>& result,
|
||||
std::vector<BT<std::string>> cmGeneratorTarget::GetLinkOptions(
|
||||
std::string const& config, std::string const& language) const
|
||||
{
|
||||
ConfigAndLanguage cacheKey(config, language);
|
||||
ConfigAndLanguage cacheKey(
|
||||
config, cmStrCat(language, this->IsDeviceLink() ? "-device" : ""));
|
||||
{
|
||||
auto it = this->LinkOptionsCache.find(cacheKey);
|
||||
if (it != this->LinkOptionsCache.end()) {
|
||||
@ -4937,7 +4938,8 @@ void cmGeneratorTarget::GetLinkDirectories(std::vector<std::string>& result,
|
||||
std::vector<BT<std::string>> cmGeneratorTarget::GetLinkDirectories(
|
||||
std::string const& config, std::string const& language) const
|
||||
{
|
||||
ConfigAndLanguage cacheKey(config, language);
|
||||
ConfigAndLanguage cacheKey(
|
||||
config, cmStrCat(language, this->IsDeviceLink() ? "-device" : ""));
|
||||
{
|
||||
auto it = this->LinkDirectoriesCache.find(cacheKey);
|
||||
if (it != this->LinkDirectoriesCache.end()) {
|
||||
|
Loading…
Reference in New Issue
Block a user