OK, here is what I have found: when building Ada executables, we link
against two other libraries, one with C code, one with C++ code. CMake
keeps track of this and adds implicit dependencies. Thus, when we link
against the C++ built library, -lstdc++ comes along for the ride.
I may be able to work around this configuration wise. But there may be
nothing I can do about this if the implicit libraries cannot be overridden.
Tom
On Fri, Jan 3, 2014 at 10:06 AM, Tom Kacvinsky <tom.kacvin...@vectorcast.com
> wrote:
> Alan,
>
> Thanks. I think I figured out what is going on. For some reason, CMake
> adds its implicit C and C++ libraries (-lm and -lc, for C, -lstdc++, -lm,
> and -lc for C++) even though the language in use at the time is Ada. I've
> asked the on the CMake list how to get around this. It could be something
> we'll need to add to the Ada support modules. I don't know at this time,
> my questions to the CMake list have gone unanswered for quite some time now.
>
> Tom
>
>
> On Tue, Dec 31, 2013 at 2:43 PM, Alan W. Irwin
> <ir...@beluga.phys.uvic.ca>wrote:
>
>> On 2013-12-31 12:32-0500 Tom Kacvinsky wrote:
>>
>> Hi,
>>>
>>> I do not know if this is the right list for asking questions about the
>>> CMake Ada support from the Plplot modules. We are using the cmake
>>> modules
>>> that you have written in order to get our Ada code compiling/linking via
>>> cmake. But one of the things I have noted is that when gnatmake runs to
>>> build an Ada executable, -lstdc++ is added to the link line. We do not
>>> add
>>> this in our CMakeLists.txt files, so there is something about how CMake
>>> is
>>> calculating LINK_LIBRARIES, but I see nothing in the Ada support that
>>> would
>>> indicated -lstdc++ being added to LINK_LIBRARIES. Have you any idea?
>>>
>>
>> Hi Tom:
>>
>> Yes, this is the right place to ask questions about that Ada language
>> support in CMake. However, note I wrote that some time ago, and at
>> that time just followed what happens in the Fortran and C cases as a
>> template with very little understanding of what goes on underneath by
>> CMake and only superficial understanding of Ada and gnatmake. That
>> said, this Ada language support works fine for us with the limitation
>> that the user has to specify additional locations (e.g., of the *.ali
>> files) to work around general CMake language support limitations.
>>
>> To answer your specific question, I cannot verify your report
>> here; I have just built our Ada bindings and our second
>> standard Ada example (to arbitrarily choose one of our ~30 standard
>> examples) using
>>
>> make VERBOSE=1 x02a >& build_x02a.out
>>
>> (I have attached a compressed version of that output file for you to
>> look at.)
>>
>> There is no mention of -lstdc++ in that file so I presume we are doing
>> something differently than what PLplot does when building your Ada
>> software. So you will want to take a look at our
>> bindings/ada/CMakeLists.txt and examples/ada/CMakeLists.txt in the
>> PLplot 5.9.11 tarball to see exactly how we use the Ada language
>> support that is implemented in cmake/modules/language_support/cmake/
>>
>> Alan
>> __________________________
>> Alan W. Irwin
>>
>> Astronomical research affiliation with Department of Physics and
>> Astronomy,
>> University of Victoria (astrowww.phys.uvic.ca).
>>
>> Programming affiliations with the FreeEOS equation-of-state
>> implementation for stellar interiors (freeeos.sf.net); the Time
>> Ephemerides project (timeephem.sf.net); PLplot scientific plotting
>> software package (plplot.sf.net); the libLASi project
>> (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
>> and the Linux Brochure Project (lbproject.sf.net).
>> __________________________
>>
>> Linux-powered Science
>> __________________________
>
>
>
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel