On Tue, Mar 25, 2014 at 12:53:11 +0000, Atila Neves wrote:
> I've had problems with the old CMake extensions for D as well. Are
> you planning on posting what you've done to make it work? I think I
> used the old CMakeD project and had to edit and delete a few files to
> get it to work, but I'm not sure how much functionality I'm missing
> because of that.

The stuff I'm using is in the repo[1]. The things that it doesn't do
that it should so far:

  - support for anything other than Linux/{ldc,gdc};
  - cross-compiling support;
  - detecting the compiler architecture; and
  - compiler version detection.

Other than that, the things it has over the CMakeD* projects I saw:

  - proper dependencies based on import statements;
  - gdc support;
  - more modern CMake style; and
  - unused/unnecessary code removed.

The problem with the compiler version and architecture detection is that
the way CMake currently does it for C/C++ is to compile a source file
with preprocessor-built strings and then greps the resulting binary for
ASCII strings and regex matches them to extract the information. Since D
doesn't have a preprocessor and I didn't see a way to find out the
compiler version or target architecture through built-in variables, this
support won't work without either CMake just asking the compiler
(requires CMake to know how to run the compiler to ask it...which may
depend on knowing the version), or to have some way of guaranteeing a
single, unbroken string that depends on the compiler show up in a D

I do plan on splitting it out at some point, but without a project
attached to it, testing is hard, so it's living in gunroar for now.



Reply via email to