diff options
Diffstat (limited to 'Source/cmMakefileExecutableTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileExecutableTargetGenerator.cxx | 38 |
1 files changed, 14 insertions, 24 deletions
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 1e59f44..08bb2ce 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -97,15 +97,15 @@ void cmMakefileExecutableTargetGenerator::WriteDeviceExecutableRule( std::vector<std::string> commands; - // Build list of dependencies. - std::vector<std::string> depends; - this->AppendLinkDepends(depends); - // Get the language to use for linking this library. std::string linkLanguage = "CUDA"; std::string const objExt = this->Makefile->GetSafeDefinition("CMAKE_CUDA_OUTPUT_EXTENSION"); + // Build list of dependencies. + std::vector<std::string> depends; + this->AppendLinkDepends(depends, linkLanguage); + // Get the name of the device object to generate. std::string const targetOutputReal = this->GeneratorTarget->ObjectDirectory + "cmake_device_link" + objExt; @@ -154,12 +154,7 @@ void cmMakefileExecutableTargetGenerator::WriteDeviceExecutableRule( linkLanguage, this->ConfigName); // Add target-specific linker flags. - this->LocalGenerator->AppendFlags( - linkFlags, this->GeneratorTarget->GetProperty("LINK_FLAGS")); - std::string linkFlagsConfig = "LINK_FLAGS_"; - linkFlagsConfig += cmSystemTools::UpperCase(this->ConfigName); - this->LocalGenerator->AppendFlags( - linkFlags, this->GeneratorTarget->GetProperty(linkFlagsConfig)); + this->GetTargetLinkFlags(linkFlags, linkLanguage); // Construct a list of files associated with this executable that // may need to be cleaned. @@ -299,13 +294,6 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) { std::vector<std::string> commands; - // Build list of dependencies. - std::vector<std::string> depends; - this->AppendLinkDepends(depends); - if (!this->DeviceLinkObject.empty()) { - depends.push_back(this->DeviceLinkObject); - } - // Get the name of the executable to generate. std::string targetName; std::string targetNameReal; @@ -383,6 +371,13 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) return; } + // Build list of dependencies. + std::vector<std::string> depends; + this->AppendLinkDepends(depends, linkLanguage); + if (!this->DeviceLinkObject.empty()) { + depends.push_back(this->DeviceLinkObject); + } + this->NumberOfProgressActions++; if (!this->NoRuleMessages) { cmLocalUnixMakefileGenerator3::EchoProgress progress; @@ -437,12 +432,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) linkLanguage, this->ConfigName); // Add target-specific linker flags. - this->LocalGenerator->AppendFlags( - linkFlags, this->GeneratorTarget->GetProperty("LINK_FLAGS")); - std::string linkFlagsConfig = "LINK_FLAGS_"; - linkFlagsConfig += cmSystemTools::UpperCase(this->ConfigName); - this->LocalGenerator->AppendFlags( - linkFlags, this->GeneratorTarget->GetProperty(linkFlagsConfig)); + this->GetTargetLinkFlags(linkFlags, linkLanguage); { std::unique_ptr<cmLinkLineComputer> linkLineComputer( @@ -466,7 +456,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) // clean set just in case. exeCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), - (targetFullPath + ".manifest").c_str())); + targetFullPath + ".manifest")); #endif if (targetNameReal != targetName) { exeCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( |