summaryrefslogtreecommitdiff
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-12-02 10:48:17 -0500
committerBrad King <brad.king@kitware.com>2022-12-02 11:04:16 -0500
commit7c63372c22a4e3b1a93092584d25f830d1014ba2 (patch)
tree1a42012b1ffb1cded657334131041f8ba915edec /Source/cmGeneratorTarget.cxx
parentf69d1872dbddb81f73d9f1dac98def9ee153ea9f (diff)
downloadcmake-7c63372c22a4e3b1a93092584d25f830d1014ba2.tar.gz
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.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 5ac4dd53c4..ab746f8f40 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -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()) {