summaryrefslogtreecommitdiffstats
path: root/Source/cmAddCustomCommandCommand.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2020-12-04 17:35:04 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2020-12-23 14:47:46 (GMT)
commitcfd8a5ac1f443725342517ddbaee51692d8d0324 (patch)
treebf2224cb9c6b6ba1a7aed1eb2fbcaf31799cbc17 /Source/cmAddCustomCommandCommand.cxx
parenta526f71266c2fed017c65a3d90b63286221476c0 (diff)
downloadCMake-cfd8a5ac1f443725342517ddbaee51692d8d0324.zip
CMake-cfd8a5ac1f443725342517ddbaee51692d8d0324.tar.gz
CMake-cfd8a5ac1f443725342517ddbaee51692d8d0324.tar.bz2
Makefiles: Add support of DEPFILE for add_custom_command
Issue: #20286 Fixes: #21415
Diffstat (limited to 'Source/cmAddCustomCommandCommand.cxx')
-rw-r--r--Source/cmAddCustomCommandCommand.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmAddCustomCommandCommand.cxx b/Source/cmAddCustomCommandCommand.cxx
index ccd7255..ff2cc3e 100644
--- a/Source/cmAddCustomCommandCommand.cxx
+++ b/Source/cmAddCustomCommandCommand.cxx
@@ -296,6 +296,12 @@ bool cmAddCustomCommandCommand(std::vector<std::string> const& args,
status.SetError("given APPEND option with no OUTPUT.");
return false;
}
+ if (!implicit_depends.empty() && !depfile.empty() &&
+ mf.GetGlobalGenerator()->GetName() != "Ninja") {
+ // Makefiles generators does not support both at the same time
+ status.SetError("IMPLICIT_DEPENDS and DEPFILE can not both be specified.");
+ return false;
+ }
// Check for an append request.
if (append) {