diff options
author | Brad King <brad.king@kitware.com> | 2015-07-21 18:37:20 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-07-21 18:39:10 (GMT) |
commit | 7e9f908ef54a3c2fe42ae8f9376c77e5bc988a9a (patch) | |
tree | 7fcc67115087af898b835f71e05700789640fa4a /Source/cmExportCommand.cxx | |
parent | 3b09398ae27f0e4b5975920ac2787427ffc6ccc4 (diff) | |
download | CMake-7e9f908ef54a3c2fe42ae8f9376c77e5bc988a9a.zip CMake-7e9f908ef54a3c2fe42ae8f9376c77e5bc988a9a.tar.gz CMake-7e9f908ef54a3c2fe42ae8f9376c77e5bc988a9a.tar.bz2 |
export: Reject custom target exports earlier (#15657)
Diagnose and reject custom targets given to the export() command
immediately. Previously we would generate an internal error later.
Diffstat (limited to 'Source/cmExportCommand.cxx')
-rw-r--r-- | Source/cmExportCommand.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmExportCommand.cxx b/Source/cmExportCommand.cxx index 43d26f9..96ea77b 100644 --- a/Source/cmExportCommand.cxx +++ b/Source/cmExportCommand.cxx @@ -177,6 +177,12 @@ bool cmExportCommand this->SetError(e.str()); return false; } + if (target->GetType() == cmTarget::UTILITY) + { + this->SetError("given custom target \"" + *currentTarget + + "\" which may not be exported."); + return false; + } } else { |