[CMake] Ada and CMake
Alan W. Irwin
irwin at beluga.phys.uvic.ca
Wed Feb 28 14:56:57 EST 2007
On 2007-02-27 22:09-0800 Alan W. Irwin wrote:
> On 2007-02-27 23:13-0500 Bill Hoffman wrote:
>
>> I wonder if you could just use the output name, and tack on the ada
>> extension to it. add_executable(foo ...)
>> gnatmake foo.ada.
>
> Thanks for that idea. I assume you are referring to the <TARGET> pattern. Now
> that I have looked at it, I believe that should work on Unix systems
> unless I run into something I am not anticipating.
>
> On Windows systems, the executable suffix .exe is a complication. I assume
> that in that case <TARGET> would resolve to foo.exe rather than foo. I
> suppose that could be beaten by setting SUFFIX to "" for the target property
> so that <TARGET> would resolve to foo on all systems. I am largely
> unfamiliar with Windows. Would the lack of the suffix on the resulting
> windows executable be a problem on that platform?
>
I got add_executable to work for the Ada language using Bill's idea.
And, on second thought I don't think the windows executable suffix will matter
since I believe that is handled separately and <TARGET> always refers to
the CMake target name (without a suffix).
The revised Ada language support files, CMakeAdaCompiler.cmake.in,
CMakeAdaInformation.cmake, CMakeDetermineAdaCompiler.cmake, and
CMakeTestAdaCompiler.cmake. can be found at
http://plplot.cvs.sourceforge.net/plplot/plplot/cmake/modules/.
ADD_LIBRARY for Ada can be seen in action at
http://plplot.cvs.sourceforge.net/plplot/plplot/bindings/ada/CMakeLists.txt,
and ADD_EXECUTABLE for Ada can be seen in action (with a workaround
with the necessary Ada limitations of that command plus use of the Ada
library that was created) at
http://plplot.cvs.sourceforge.net/plplot/plplot/examples/ada/CMakeLists.txt.
So far, this experimental CMake support for the Ada language has only been
tested on Debian stable and Ubuntu Dapper, but testing of additional
platforms by other PLplot developers should follow soon.
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); PLplot scientific plotting software
package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the
Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________
Linux-powered Science
__________________________
More information about the CMake
mailing list