diff options
author | Brad King <brad.king@kitware.com> | 2017-04-21 12:57:55 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-04-21 12:57:59 (GMT) |
commit | 1d8f0f918178c50e8ef66b01546f34cd2a126a6d (patch) | |
tree | 04d8830fb1d4b5338e9afabcb8ac3b4bb134fb05 /Source/cmGeneratorTarget.cxx | |
parent | 0ad8e4ea658ed992841c81dca2c5eb31abc40983 (diff) | |
parent | 23691d789e198c228e5c2bb7016b3b1194fd0635 (diff) | |
download | CMake-1d8f0f918178c50e8ef66b01546f34cd2a126a6d.zip CMake-1d8f0f918178c50e8ef66b01546f34cd2a126a6d.tar.gz CMake-1d8f0f918178c50e8ef66b01546f34cd2a126a6d.tar.bz2 |
Merge topic 'enable_ptx_compilation'
23691d78 CUDA: Allow sources to be compiled to .ptx files
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !725
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 1d6e7fe..10a7706 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -536,6 +536,18 @@ const std::string& cmGeneratorTarget::GetObjectName(cmSourceFile const* file) return this->Objects[file]; } +const char* cmGeneratorTarget::GetCustomObjectExtension() const +{ + static std::string extension; + const bool has_ptx_extension = + this->GetPropertyAsBool("CUDA_PTX_COMPILATION"); + if (has_ptx_extension) { + extension = ".ptx"; + return extension.c_str(); + } + return CM_NULLPTR; +} + void cmGeneratorTarget::AddExplicitObjectName(cmSourceFile const* sf) { this->ExplicitObjectName.insert(sf); |