mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-23 14:48:19 -05:00
Merge topic 'msvc_cuda_files_use_consistent_obj_names'
fa583869 CUDA: Use MSVC default pattern for naming object files
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1722
This commit is contained in:
@@ -2078,9 +2078,15 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags(
|
||||
(*this->BuildFileStream) << firstString;
|
||||
firstString = "";
|
||||
hasFlags = true;
|
||||
this->WriteString("<ObjectFileName>", 3);
|
||||
(*this->BuildFileStream) << "$(IntDir)/" << objectName
|
||||
<< "</ObjectFileName>\n";
|
||||
if (lang == "CUDA") {
|
||||
this->WriteString("<CompileOut>", 3);
|
||||
(*this->BuildFileStream) << "$(IntDir)/" << objectName
|
||||
<< "</CompileOut>\n";
|
||||
} else {
|
||||
this->WriteString("<ObjectFileName>", 3);
|
||||
(*this->BuildFileStream) << "$(IntDir)/" << objectName
|
||||
<< "</ObjectFileName>\n";
|
||||
}
|
||||
}
|
||||
for (std::string const& config : this->Configurations) {
|
||||
std::string configUpper = cmSystemTools::UpperCase(config);
|
||||
@@ -2688,6 +2694,11 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaOptions(
|
||||
cudaOptions.AddFlag("GPUDebugInfo", "false");
|
||||
}
|
||||
|
||||
// The extension on object libraries the CUDA gives isn't
|
||||
// consistent with how MSVC generates object libraries for C+, so set
|
||||
// the default to not have any extension
|
||||
cudaOptions.AddFlag("CompileOut", "$(IntDir)%(Filename).obj");
|
||||
|
||||
bool notPtx = true;
|
||||
if (this->GeneratorTarget->GetPropertyAsBool("CUDA_SEPARABLE_COMPILATION")) {
|
||||
cudaOptions.AddFlag("GenerateRelocatableDeviceCode", "true");
|
||||
|
||||
Reference in New Issue
Block a user