diff options
author | Brad King <brad.king@kitware.com> | 2022-12-02 10:48:17 -0500 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-12-02 11:04:16 -0500 |
commit | 7c63372c22a4e3b1a93092584d25f830d1014ba2 (patch) | |
tree | 1a42012b1ffb1cded657334131041f8ba915edec /Source/cmGeneratorTarget.cxx | |
parent | f69d1872dbddb81f73d9f1dac98def9ee153ea9f (diff) | |
download | cmake-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.cxx | 6 |
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()) { |