ninja: Add support for custom depfile formats
Not everything that isn't MSVC is GCC. I have support for LDC's depfile format on its way upstream[1], but its future is uncertain. CMake should at least support this for future depfile formats. [1]https://github.com/martine/ninja/pull/721
This commit is contained in:
parent
6f39a6ff32
commit
9523d2a55c
|
@ -0,0 +1,5 @@
|
|||
custom-ninja-deptypes
|
||||
---------------------
|
||||
|
||||
* Add a `CMAKE_NINJA_DEPTYPE_<LANG>` variable so that compilers may set the
|
||||
deptype for use in Ninja other than those CMake itself knows about.
|
|
@ -418,6 +418,11 @@ cmNinjaTargetGenerator
|
|||
else
|
||||
{
|
||||
deptype = "gcc";
|
||||
const char* langdeptype = mf->GetDefinition("CMAKE_NINJA_DEPTYPE_" + lang);
|
||||
if (langdeptype)
|
||||
{
|
||||
deptype = langdeptype;
|
||||
}
|
||||
depfile = "$DEP_FILE";
|
||||
const std::string flagsName = "CMAKE_DEPFILE_FLAGS_" + lang;
|
||||
std::string depfileFlags = mf->GetSafeDefinition(flagsName);
|
||||
|
|
Loading…
Reference in New Issue