Building a project with CMAKE

berni via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Feb 28 09:09:28 PST 2017


I'm using CMAKE to build my project. With 
https://github.com/dcarp/cmake-d this works almost. The only 
thing I do not manage to get working is running cmake in release 
mode. When I use -DCMAKE_BUILD_TYPE=Release I get some linker 
errors, which I do not get, when compiling manually. (In both 
cases gdc/linux is used.)

I allready could figure out, that it's due to the -O3 compiler 
flag used in release mode. It looks like cmake compiles all *.d 
files separately and while doing so, removes some functions when 
optimizing them. Later, when linking everything together, they 
are missing. (But I'm not sure on this.)

Here is my project: https://github.com/crocopaw/croco/tree/devel

Anybody here who has experience with CMAKE and D and could help?


More information about the Digitalmars-d-learn mailing list