Compililng C++ and D together without going mad

Jan Hönig hrominium at
Wed Apr 29 10:25:31 UTC 2020

In my pet project, I am using some C++ libraries. The main 
file/function is also C++. All of it successfully compiles with 
cmake. Now I want to add some functionality by calling my own D 
functions (which use some other modules/projects/phobos).

My questions is, what is the "proper" building tool/way.
Do I extend my CMakeFile.txt with additional instructions, which 
basically do a "dmd -c ...".
Do I use dub to compile the D part as a library, and use that in 
the cmake file?
Do I use dub to compile the C++ part as well?

Surely somebody has done something similar.
Can you pinpoint me to some examples? I could go from there.

More information about the Digitalmars-d-learn mailing list