comp.lang.ada
 help / color / mirror / Atom feed
From: "Alex R. Mosteo" <alejandro@mosteo.invalid>
Subject: Re: CMake and Ada : a track around the place ?
Date: Mon, 01 Aug 2011 11:23:33 +0200
Date: 2011-08-01T11:23:33+02:00	[thread overview]
Message-ID: <j15rap$vma$1@dont-email.me> (raw)
In-Reply-To: op.vzfke8a2ule2fv@douda-yannick

Yannick Duchêne (Hibou57) wrote:

> Hi all (a long time I didn't posted here, hope every one is fine and fine)
> 
> I may have two opportunities to push Ada in two different projects. The
> first one is OK, as I will start it from the ground up. The second one is
> rather different, in the way it is an already existing project I would
> like to work on (may not be a priority, as I would probably get nothing
> for this, as it is a GPL application). This is a C++ rather big (for me)
> peace of software, which however provide an opportunity to push Ada
> inside, as it is a very modular application (I may dream, in the future,
> to incrementally translate some part from C++ to Ada, as I hate when this
> application crash with no back-track and runtime-check at all). Alex R.
> Masteo already talked about CMake and Ada here, as I did too some time
> before Alex. Ludovic replied to Alex using CMake is a bad idea. I
> understood the reason he gave, but I simply would like it anyway, for
> seamless integration, as this application has a build process all designed
> around CMake since long, and I would not want to change.
> 
> The sole material I could found about this topic, is an old mailing list
> archive. I just made a test with a sample Ada project to see what's going
> on using Make as-is, and CMake complained he could not determine some
> linker language for the target application. So Ada is clearly not built-in
> the default CMake.
> 
> Any track for using CMake to build a source tree containing Ada sources
> mixed with C++ files ? I would probably rely on solely GNAT for the Ada
> compiler, as it comes along GCC (this may help).

Hi Yannick,

I wish you some success here since I'm really interested in this too. In the 
end, I finally went pure C++ after my earlier posts on this topic, for a 
variety of minor reasons that together made this the better choice.

That said, I never got around to make any Ada tests, but after all the 
discussion here and the threads (that can be easily found) on the Ada PlPlot 
binding (which also uses CMake), my final conclusion was that, whenever I 
get the opportunity, I'll start by testing the apparently simplest option of 
bypassing CMake from inside CMake: that is, launching gprbuild 
(add_custom_command, add_custom_target? execute_process?) to build a self-
contained Ada library that is finally linked to the main C++ executable 
(with link_libraries and target_link_libraries).

This is ugly in that it simply does not integrate Ada into CMake (as the 
guys from PlPlot seem to have done); I'm not even sure if this will work 
and, if it does, which complications may arise. On the other hand, CMake 
(partially) sets to solve a problem that Ada does not have, so I feel it is 
OK to rely on the Ada compilation process, particularly if it is the way of 
minimal integration pain.

In any case, I'm interested in your experience, so please do share any or 
other way!

Alex.

> 
> Have a nice time all, and happy designing
> 
> 




  reply	other threads:[~2011-08-01  9:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-30 11:48 CMake and Ada : a track around the place ? Yannick Duchêne (Hibou57)
2011-08-01  9:23 ` Alex R. Mosteo [this message]
2011-08-01 10:54   ` Yannick Duchêne (Hibou57)
2011-08-04  9:27     ` Alex R. Mosteo
2011-08-05  5:50   ` Ada novice
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox