diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2017-01-05 21:31:36 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-01-12 20:13:36 (GMT) |
commit | 8d1f9e5b850e02d304e4c209e720f06e25837470 (patch) | |
tree | 35e787859dc2a9e3bc4ebb9eb6fcd8a666f09e9c /Source/cmLocalGenerator.cxx | |
parent | dc5051f1c1b7604b9c05e04bdccdff222b69efa0 (diff) | |
download | CMake-8d1f9e5b850e02d304e4c209e720f06e25837470.zip CMake-8d1f9e5b850e02d304e4c209e720f06e25837470.tar.gz CMake-8d1f9e5b850e02d304e4c209e720f06e25837470.tar.bz2 |
CUDA: Now pass correct FLAGS when device link cuda executables.
Previously we had a two issues when building cuda executables
that required separable compilation. The first was that we didn't
propagate FLAGS causing any -arch / -gencode flags to be dropped, and
secondly generators such as ninja would use the CXX language flags
instead of CUDA when the executable was mixed language.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index ead1e72..44c390c 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -13,6 +13,7 @@ #include "cmInstallScriptGenerator.h" #include "cmInstallTargetGenerator.h" #include "cmLinkLineComputer.h" +#include "cmLinkLineDeviceComputer.h" #include "cmMakefile.h" #include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" @@ -979,7 +980,9 @@ void cmLocalGenerator::GetTargetFlags( linkFlags += this->Makefile->GetSafeDefinition(build); linkFlags += " "; } - std::string linkLanguage = target->GetLinkerLanguage(buildType); + + const std::string linkLanguage = + linkLineComputer->GetLinkerLanguage(target, buildType); if (linkLanguage.empty()) { cmSystemTools::Error( "CMake can not determine linker language for target: ", |