summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorZack Galbreath <zack.galbreath@kitware.com>2021-05-27 18:03:51 (GMT)
committerZack Galbreath <zack.galbreath@kitware.com>2021-06-07 19:25:34 (GMT)
commit8514ee9b315b4ad02eed0e3cf11d8579f307fac0 (patch)
treedf30dd3b7d79440fad1319bcbce9889de8686461 /Source/cmGeneratorTarget.cxx
parent20d086f1a2c320da59830682a19e006ec19dca94 (diff)
downloadCMake-8514ee9b315b4ad02eed0e3cf11d8579f307fac0.zip
CMake-8514ee9b315b4ad02eed0e3cf11d8579f307fac0.tar.gz
CMake-8514ee9b315b4ad02eed0e3cf11d8579f307fac0.tar.bz2
HIP: analyze output of `hipcc` to determine default GPU architecture
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index cb10117..f268c6c 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -3419,6 +3419,12 @@ void cmGeneratorTarget::AddHIPArchitectureFlags(std::string& flags) const
{
const std::string& property = this->GetSafeProperty("HIP_ARCHITECTURES");
+ if (property.empty()) {
+ this->Makefile->IssueMessage(MessageType::FATAL_ERROR,
+ "HIP_ARCHITECTURES is empty for target \"" +
+ this->GetName() + "\".");
+ }
+
// If HIP_ARCHITECTURES is false we don't add any architectures.
if (cmIsOff(property)) {
return;