diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-02-08 18:12:45 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-02-08 18:21:30 (GMT) |
commit | 510fdcb18801076e2041eaae2941375eecc93ec2 (patch) | |
tree | 97cb7b62dc605e8cc8f46cf092ba75911e0a6e6c /Source/cmTargetPropCommandBase.cxx | |
parent | 4de71786e89ba35190e23ae9e1c05f902c5350ff (diff) | |
download | CMake-510fdcb18801076e2041eaae2941375eecc93ec2.zip CMake-510fdcb18801076e2041eaae2941375eecc93ec2.tar.gz CMake-510fdcb18801076e2041eaae2941375eecc93ec2.tar.bz2 |
Whitelist target types in target_{include_directories,compile_definitions}
Setting include directories or compile definitions on a target created
with add_custom_target does not make sense.
Diffstat (limited to 'Source/cmTargetPropCommandBase.cxx')
-rw-r--r-- | Source/cmTargetPropCommandBase.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmTargetPropCommandBase.cxx b/Source/cmTargetPropCommandBase.cxx index 18a1d2a..771097c 100644 --- a/Source/cmTargetPropCommandBase.cxx +++ b/Source/cmTargetPropCommandBase.cxx @@ -38,6 +38,15 @@ bool cmTargetPropCommandBase this->HandleMissingTarget(args[0]); return false; } + if ((this->Target->GetType() != cmTarget::SHARED_LIBRARY) + && (this->Target->GetType() != cmTarget::STATIC_LIBRARY) + && (this->Target->GetType() != cmTarget::OBJECT_LIBRARY) + && (this->Target->GetType() != cmTarget::MODULE_LIBRARY) + && (this->Target->GetType() != cmTarget::EXECUTABLE)) + { + this->SetError("called with non-compilable target type"); + return false; + } unsigned int argIndex = 1; |