summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-04-21 12:57:55 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-04-21 12:57:59 (GMT)
commit1d8f0f918178c50e8ef66b01546f34cd2a126a6d (patch)
tree04d8830fb1d4b5338e9afabcb8ac3b4bb134fb05 /Source/cmTarget.cxx
parent0ad8e4ea658ed992841c81dca2c5eb31abc40983 (diff)
parent23691d789e198c228e5c2bb7016b3b1194fd0635 (diff)
downloadCMake-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/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index bda1d95..f675833 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -941,6 +941,14 @@ void cmTarget::SetProperty(const std::string& prop, const char* value)
} else if (cmHasLiteralPrefix(prop, "IMPORTED_LIBNAME") &&
!this->CheckImportedLibName(prop, value ? value : "")) {
/* error was reported by check method */
+ } else if (prop == "CUDA_PTX_COMPILATION" &&
+ this->GetType() != cmStateEnums::OBJECT_LIBRARY) {
+ std::ostringstream e;
+ e << "CUDA_PTX_COMPILATION property can only be applied to OBJECT "
+ "targets (\""
+ << this->Name << "\")\n";
+ this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
+ return;
} else {
this->Properties.SetProperty(prop, value);
}