[CMake] Problem Porting from cmake 2.4.7 to 2.6

Alan W. Irwin irwin at beluga.phys.uvic.ca
Fri Jun 27 19:26:46 EDT 2008


On 2008-06-27 16:11-0400 Brad King wrote:

> Alan W. Irwin wrote:
>> The issue is that for 2.4.8, rpath is set appropriately for the Ada
>> executable
>> to find the Ada shared library that was built, but for 2.6.0, rpath is not
>> set at all.  Note, I do nothing special with rpath for this simple test
>> project so it just has the default rpath behaviour.  But that default
>> behaviour seems to have changed between 2.4.8 and 2.6.0 (probably due to
>> some limitation in my Ada language support files).
>>
>> I hope this one is as easy to solve as the OUTPUT_EXTENSION issue.
>
> # CMakeAdaInformation.cmake
> IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Ada_FLAG)
>  SET(CMAKE_SHARED_LIBRARY_RUNTIME_Ada_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG})
> ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Ada_FLAG)
>
> IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Ada_FLAG_SEP)
>  SET(CMAKE_SHARED_LIBRARY_RUNTIME_Ada_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP})
> ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Ada_FLAG_SEP)
>
> IF(NOT CMAKE_EXECUTABLE_RUNTIME_Ada_FLAG)
>  SET(CMAKE_EXECUTABLE_RUNTIME_Ada_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_Ada_FLAG})
> ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_Ada_FLAG)
>
> IF(NOT CMAKE_EXECUTABLE_RUNTIME_Ada_FLAG_SEP)
>  SET(CMAKE_EXECUTABLE_RUNTIME_Ada_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_Ada_FLAG_SEP})
> ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_Ada_FLAG_SEP)

Thanks, Brad, for pointing me in the correct direction.  Checking with the
2.4.8 and 2.6.0 versions of the corresponding Fortran file, the variables
that must be added in total for 2.6.0 and Ada are actually

CMAKE_SHARED_LIBRARY_RPATH_LINK_Ada_FLAG
CMAKE_EXECUTABLE_RUNTIME_Ada_FLAG *
CMAKE_EXECUTABLE_RUNTIME_Ada_FLAG_SEP *
CMAKE_EXECUTABLE_RPATH_LINK_Ada_FLAG
CMAKE_SHARED_LIBRARY_LINK_Ada_WITH_RUNTIME_PATH

* indicates ones you mentioned above.

Once those additional variables are set, shared Ada libraries work for the
simple test project and also for PLplot regardless of whether I use
2.4.8 or 2.6.0!

So it really does appear there is a significant addition to the number of
variables you have to set for 2.6.0 language support compared to 2.4.x
language support.

To Bill Hoffman: I don't mind that backwards incompatible change, but there
might be one or two others trying to port language support between 2.4.8 and
2.6.0 so perhaps this change should be documented somewhere?

Thanks very much, Brad, for helping me to get these Ada language support
issues straightened out for 2.6.0.

To Alexander Camak (and others interested in Ada support for CMake): please
try the test project with the option of shared libraries for CMake-2.6.0 to
be sure it works on all platforms of interest to you.

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 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
__________________________


More information about the CMake mailing list