diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2017-03-23 09:31:45 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-04-20 13:25:38 -0400 |
commit | 23691d789e198c228e5c2bb7016b3b1194fd0635 (patch) | |
tree | f193265a71bd50a5a8df8f6e5a4c562dbdc375f3 /Source/cmLocalNinjaGenerator.cxx | |
parent | 44f0d2d9913595e214048b6d5a2b9ab2e9d1cf46 (diff) | |
download | cmake-23691d789e198c228e5c2bb7016b3b1194fd0635.tar.gz |
CUDA: Allow sources to be compiled to .ptx files
When the target property `CUDA_PTX_COMPILATION` is enabled CUDA OBJECT
libraries will generate ptx files instead of object files.
Diffstat (limited to 'Source/cmLocalNinjaGenerator.cxx')
-rw-r--r-- | Source/cmLocalNinjaGenerator.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index c2d9d575e3..00f5e4bbdd 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -249,12 +249,15 @@ void cmLocalNinjaGenerator::ComputeObjectFilenames( std::map<cmSourceFile const*, std::string>& mapping, cmGeneratorTarget const* gt) { + // Determine if these object files should use a custom extension + char const* custom_ext = gt->GetCustomObjectExtension(); for (std::map<cmSourceFile const*, std::string>::iterator si = mapping.begin(); si != mapping.end(); ++si) { cmSourceFile const* sf = si->first; - si->second = - this->GetObjectFileNameWithoutTarget(*sf, gt->ObjectDirectory); + bool keptSourceExtension; + si->second = this->GetObjectFileNameWithoutTarget( + *sf, gt->ObjectDirectory, &keptSourceExtension, custom_ext); } } |