[CMake] CMake C++/ADA

alexander at camek.de alexander at camek.de
Wed Mar 19 06:05:36 EDT 2008


Hi Romain,

> I must do a project for my university. This project is composed of 
> three part, one in C, one in Ada and one C++(Qt for Ui)

First of all it is possible to use these three languages in one project. I am doing it here for at least one year.

If you want to do an intermixing of these three languages, then there could be a problem. If you are using Ada only for generating executables then you will use "gnatmake" as it done in Alan's given examples. But when you are using Ada language for generating DLLs or SO, then sometimes you have to call the "gnatbind" on the generated ali files on your own. Because if you don't do that, there will be no __elab part and no adainit/adafinialize part (second one could be written explicit in your source code too).

>I would like to know how i have to write my "CMakelists.txt".
>If you have some example of "CMakeLists.txt", or ideas for solve my >problem of language compatibility.

The written CMakeLists.txt don't differ much to example files as you can find them at the cmake site. For Ada language support you can use the files given by Alan's former post. These helped me for starting. 

Hope to help so far.

Feel free to ask more questions

Greetings

Alexander


More information about the CMake mailing list