-
Notifications
You must be signed in to change notification settings - Fork 2
Home
This project is a set of modifications to CMake attempting to add D as a first-class supported language. It is not affiliated with the CMake upstream.
Other projects have existed with the goal of adding D support to CMake, but none I know of have been brave enough to touch CMake's sources. Unfortunately for those projects, features I consider crucial can only be made available by changing the C++ source code:
-
Dependency tracking
CMake tracks the dependencies in a code base, so that foo will be recompiled if a source file it references changes.
-
Visual Studio support
Generating Visual Studio / Visual D project files required teaching CMake's C++ how to do that. foo.visualdproj uses a radically different format than foo.vcxproj
-
Linking to libraries
Shared libraries will not link correctly on older versions of DMD or any version of LDC. This required Ben and I to add a language-specific override to some linker flags and translate .so into -L-l:.so (or equivalent for other compilers)
-
Listing in the CMake GUI
Being able to configure a project via the Qt QUI is a must, but D can't be listed in the compiler selection dialog if you don't modify the C++/Qt sources.
-
include_directories(TEXT )
Strictly speaking, you don't need C++ modification for adding -J flags, but if you want -J directories to be handled the same way -I directories are, you do. Also, it makes for a nicer API.
We attempt to put as much as is reasonable in modules, though functionality will be implemented in C++ as needed.
For usage info specific to D, see Usage.
For general CMake documentation (including my changes), see here.
I used to have binaries here, but they are woefully out of date, and I have as of yet not been patient enough to build new packages. Contact me if this is something you really need.