diff options
author | Robert Maynard <rmaynard@nvidia.com> | 2022-04-22 16:51:26 (GMT) |
---|---|---|
committer | Robert Maynard <rmaynard@nvidia.com> | 2022-07-22 14:34:45 (GMT) |
commit | 96bc59b1ca01be231347404d178445263687dd22 (patch) | |
tree | d9c015f30a1e43f0d5ded6dc75a638471f085ed6 /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | 1527d48cd0071e3e1737b51db3738f7f76ddbf80 (diff) | |
download | CMake-96bc59b1ca01be231347404d178445263687dd22.zip CMake-96bc59b1ca01be231347404d178445263687dd22.tar.gz CMake-96bc59b1ca01be231347404d178445263687dd22.tar.bz2 |
CUDA: Add Device LTO support for nvcc
Fixes #22200
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index a7460e8..020691d 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -3300,6 +3300,7 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions( this->LangForClCompile = langForClCompile; if (!langForClCompile.empty()) { this->LocalGenerator->AddLanguageFlags(flags, this->GeneratorTarget, + cmBuildStep::Compile, langForClCompile, configName); this->LocalGenerator->AddCompileOptions(flags, this->GeneratorTarget, langForClCompile, configName); @@ -3675,8 +3676,8 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaOptions( // Get compile flags for CUDA in this directory. std::string flags; - this->LocalGenerator->AddLanguageFlags(flags, this->GeneratorTarget, "CUDA", - configName); + this->LocalGenerator->AddLanguageFlags( + flags, this->GeneratorTarget, cmBuildStep::Compile, "CUDA", configName); this->LocalGenerator->AddCompileOptions(flags, this->GeneratorTarget, "CUDA", configName); @@ -3947,7 +3948,8 @@ bool cmVisualStudio10TargetGenerator::ComputeMasmOptions( std::string flags; this->LocalGenerator->AddLanguageFlags(flags, this->GeneratorTarget, - "ASM_MASM", configName); + cmBuildStep::Compile, "ASM_MASM", + configName); masmOptions.Parse(flags); @@ -3999,7 +4001,8 @@ bool cmVisualStudio10TargetGenerator::ComputeNasmOptions( std::string flags; this->LocalGenerator->AddLanguageFlags(flags, this->GeneratorTarget, - "ASM_NASM", configName); + cmBuildStep::Compile, "ASM_NASM", + configName); flags += " -f"; flags += this->Makefile->GetSafeDefinition("CMAKE_ASM_NASM_OBJECT_FORMAT"); nasmOptions.Parse(flags); |