diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmAddCustomCommandCommand.cxx | 2 | ||||
-rw-r--r-- | Source/cmGlobalGenerator.h | 2 | ||||
-rw-r--r-- | Source/cmGlobalNinjaGenerator.h | 2 |
3 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmAddCustomCommandCommand.cxx b/Source/cmAddCustomCommandCommand.cxx index 5deba8b..231a2d6 100644 --- a/Source/cmAddCustomCommandCommand.cxx +++ b/Source/cmAddCustomCommandCommand.cxx @@ -174,7 +174,7 @@ bool cmAddCustomCommandCommand(std::vector<std::string> const& args, doing = doing_comment; } else if (copy == keyDEPFILE) { doing = doing_depfile; - if (mf.GetGlobalGenerator()->GetName() != "Ninja") { + if (!mf.GetGlobalGenerator()->SupportsCustomCommandDepfile()) { status.SetError("Option DEPFILE not supported by " + mf.GetGlobalGenerator()->GetName()); return false; diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index e6ab1dd..0e7e03d 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -448,6 +448,8 @@ public: MacFolder. */ virtual bool ShouldStripResourcePath(cmMakefile*) const; + virtual bool SupportsCustomCommandDepfile() const { return false; } + std::string GetSharedLibFlagsForLanguage(std::string const& lang) const; /** Generate an <output>.rule file path for a given command output. */ diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 0e53c0e..a59859e 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -211,6 +211,8 @@ public: } const char* GetCleanTargetName() const override { return "clean"; } + bool SupportsCustomCommandDepfile() const override { return true; } + virtual cmGeneratedFileStream* GetImplFileStream( const std::string& /*config*/) const { |