diff options
author | Brad King <brad.king@kitware.com> | 2020-05-25 14:35:08 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-05-25 14:35:13 (GMT) |
commit | f7960e548808bc7412a1071c03ec7cb0ddd76c00 (patch) | |
tree | ef5a2246e8869e825465091618a9e0adb8668759 /Source/cmGeneratorTarget.cxx | |
parent | 7b56d0a377fc8045b5714b4ccbfa3cacf1cf5e50 (diff) | |
parent | bcb44ac2ee0609b701fef84bcc333fda9b1c02b9 (diff) | |
download | CMake-f7960e548808bc7412a1071c03ec7cb0ddd76c00.zip CMake-f7960e548808bc7412a1071c03ec7cb0ddd76c00.tar.gz CMake-f7960e548808bc7412a1071c03ec7cb0ddd76c00.tar.bz2 |
Merge topic 'cuda-runtime-cleanup'
bcb44ac2ee CUDA: Simplify Clang implicit host linker settings
23519dd24f CUDA: Fix implicit runtime library filtering on Windows
16bed00712 CUDA: Refactor implicit library filtering
5c7ca6f8a8 CUDA: Move VS CudaRuntime selection to be with rest of CUDA options
4468acb979 CUDA: Factor runtime library lookup into helper method
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !4776
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 917985a..f2a51ab 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -5710,6 +5710,25 @@ void cmGeneratorTarget::GetTargetVersion(const std::string& property, } } +std::string cmGeneratorTarget::GetRuntimeLinkLibrary( + std::string const& lang, std::string const& config) const +{ + // This is activated by the presence of a default selection whether or + // not it is overridden by a property. + cmProp runtimeLibraryDefault = this->Makefile->GetDef( + cmStrCat("CMAKE_", lang, "_RUNTIME_LIBRARY_DEFAULT")); + if (!runtimeLibraryDefault || runtimeLibraryDefault->empty()) { + return std::string(); + } + cmProp runtimeLibraryValue = + this->Target->GetProperty(cmStrCat(lang, "_RUNTIME_LIBRARY")); + if (!runtimeLibraryValue) { + runtimeLibraryValue = runtimeLibraryDefault; + } + return cmSystemTools::UpperCase(cmGeneratorExpression::Evaluate( + *runtimeLibraryValue, this->LocalGenerator, config, this)); +} + std::string cmGeneratorTarget::GetFortranModuleDirectory( std::string const& working_dir) const { |