summaryrefslogtreecommitdiff
path: root/Source/cmTargetPropCommandBase.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-07-31 16:02:07 +0200
committerStephen Kelly <steveire@gmail.com>2013-07-31 16:06:34 +0200
commitc0b868220084ad6d2ca88a4fdd9564f887374fc2 (patch)
tree3cd1f4e3561f796e889a968eb8c1e3827372846f /Source/cmTargetPropCommandBase.cxx
parent0cecc7b485774be084a6d5a72e743ed9893daa5d (diff)
downloadcmake-c0b868220084ad6d2ca88a4fdd9564f887374fc2.tar.gz
Allow target commands to be invoked with no items (#14325).
Code such as target_include_directories(foo PRIVATE ${items}) should not work or break based on whether items is defined or not.
Diffstat (limited to 'Source/cmTargetPropCommandBase.cxx')
-rw-r--r--Source/cmTargetPropCommandBase.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmTargetPropCommandBase.cxx b/Source/cmTargetPropCommandBase.cxx
index 287ce46a26..37aa604fb8 100644
--- a/Source/cmTargetPropCommandBase.cxx
+++ b/Source/cmTargetPropCommandBase.cxx
@@ -19,7 +19,7 @@ bool cmTargetPropCommandBase
::HandleArguments(std::vector<std::string> const& args, const char *prop,
ArgumentFlags flags)
{
- if(args.size() < 3)
+ if(args.size() < 2)
{
this->SetError("called with incorrect number of arguments");
return false;
@@ -53,7 +53,7 @@ bool cmTargetPropCommandBase
if ((flags & PROCESS_SYSTEM) && args[argIndex] == "SYSTEM")
{
- if (args.size() < 4)
+ if (args.size() < 3)
{
this->SetError("called with incorrect number of arguments");
return false;
@@ -65,7 +65,7 @@ bool cmTargetPropCommandBase
bool prepend = false;
if ((flags & PROCESS_BEFORE) && args[argIndex] == "BEFORE")
{
- if (args.size() < 4)
+ if (args.size() < 3)
{
this->SetError("called with incorrect number of arguments");
return false;