On 2016-06-02 20:10-0000 Ilias Miroslav wrote:


Greetings, dear experts,


we have (two) short Fortran programs (detection of integer*4/8 for math 
libraries) which we would like to build and execute during project's  
configuration phase.


There is the " CheckFortranSourceCompiles" command to compile a Fortran source 
code during project's  configure time.  However, we would be glad also to execute the 
resulting a.out binary and check if it passes or crashes.


Any help, please ? Is there a way to compile/execute short program in the 
configuration  stage of the (big) project ?

Hi Ilias:

It appears you want the Fortran equivalent of the CHECK_C_SOURCE_RUNS
macro. So I suggest you copy that macro (found in
Modules/CheckCSourceRuns.cmake) to your own source code where your
other home-grown CMake macros are located, rename that macro to
CHECK_FORTRAN_SOURCE_RUNS, and make the minor modifications to that
macro that are appropriate for the Fortran case.

By the way, such copy and modification is permitted/encouraged by the
copyright license for CMake as given in Modules/CheckCSourceRuns.cmake
although as that source file licensing text summary says you do have
to put the full text of the license in that modified file.

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

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to