CMake with D support early snapshot

Trent Forkert trentforkert at gmail.com
Wed Mar 26 15:52:43 PDT 2014


I have a quandary you might be able to help with, Ben.

I've been working on moving dependency resolution things to 
cmDependsD.cxx, and I've got it mostly working.

However, if we have gdc produce make-style dependencies (which 
will still require processing to get CMake to be happy), that 
requires me to put a special case in the C++ that I'd rather not 
have.

The way I see it, there are three possibilities here:
1. Keep gdc producing make-style deps, and deal with that as 
needed.
2. Have gdc produce dmd-style deps, and let the patched Ninja you 
mentioned use that.
3. Have a separate flag registered for the two different styles 
of dependencies.

I'm quite partial to number 3, as I could then use that to check 
which flags are defined for which style is supported, and act 
accordingly. I prefer that to hardcoding "gdc does this. Anything 
else does this other thing."

It should be noted that (AFAICT), the Ninja generator is the only 
thing that even considers ${CMAKE_DEPFILE_FLAGS_<lang>}. All the 
Makefile generators (basically everything but Ninja, VS, and 
possibly XCode) use the cmDepends system.

Thoughts?

  - Trent


More information about the Digitalmars-d-announce mailing list