summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorAsit Dhal <dhal.asitk@gmail.com>2020-12-19 12:44:35 (GMT)
committerAsit Dhal <dhal.asitk@gmail.com>2020-12-19 13:51:39 (GMT)
commitb68699b71799762812fd58a6f257bc7cc9820761 (patch)
tree6692ccde6094d379de31bc0f531658a8b0461f6c /Source
parentd231f429f10e920e08607a7371f6f7e7e17aa93b (diff)
downloadCMake-b68699b71799762812fd58a6f257bc7cc9820761.zip
CMake-b68699b71799762812fd58a6f257bc7cc9820761.tar.gz
CMake-b68699b71799762812fd58a6f257bc7cc9820761.tar.bz2
target_include_directories: Support AFTER option
Fixes: #20134
Diffstat (limited to 'Source')
-rw-r--r--Source/cmTargetIncludeDirectoriesCommand.cxx1
-rw-r--r--Source/cmTargetPropCommandBase.cxx7
-rw-r--r--Source/cmTargetPropCommandBase.h5
3 files changed, 11 insertions, 2 deletions
diff --git a/Source/cmTargetIncludeDirectoriesCommand.cxx b/Source/cmTargetIncludeDirectoriesCommand.cxx
index 35635b9..bf4cc09 100644
--- a/Source/cmTargetIncludeDirectoriesCommand.cxx
+++ b/Source/cmTargetIncludeDirectoriesCommand.cxx
@@ -101,5 +101,6 @@ bool cmTargetIncludeDirectoriesCommand(std::vector<std::string> const& args,
args, "INCLUDE_DIRECTORIES",
TargetIncludeDirectoriesImpl::ArgumentFlags(
TargetIncludeDirectoriesImpl::PROCESS_BEFORE |
+ TargetIncludeDirectoriesImpl::PROCESS_AFTER |
TargetIncludeDirectoriesImpl::PROCESS_SYSTEM));
}
diff --git a/Source/cmTargetPropCommandBase.cxx b/Source/cmTargetPropCommandBase.cxx
index b050a58..e41714a 100644
--- a/Source/cmTargetPropCommandBase.cxx
+++ b/Source/cmTargetPropCommandBase.cxx
@@ -87,6 +87,13 @@ bool cmTargetPropCommandBase::HandleArguments(
}
prepend = true;
++argIndex;
+ } else if ((flags & PROCESS_AFTER) && args[argIndex] == "AFTER") {
+ if (args.size() < 3) {
+ this->SetError("called with incorrect number of arguments");
+ return false;
+ }
+ prepend = false;
+ ++argIndex;
}
if ((flags & PROCESS_REUSE_FROM) && args[argIndex] == "REUSE_FROM") {
diff --git a/Source/cmTargetPropCommandBase.h b/Source/cmTargetPropCommandBase.h
index 50ac1aa..fc24fe8 100644
--- a/Source/cmTargetPropCommandBase.h
+++ b/Source/cmTargetPropCommandBase.h
@@ -23,8 +23,9 @@ public:
{
NO_FLAGS = 0x0,
PROCESS_BEFORE = 0x1,
- PROCESS_SYSTEM = 0x2,
- PROCESS_REUSE_FROM = 0x3
+ PROCESS_AFTER = 0x2,
+ PROCESS_SYSTEM = 0x3,
+ PROCESS_REUSE_FROM = 0x4
};
bool HandleArguments(std::vector<std::string> const& args,