[CMake] execute short program during cmake configuration ?

2016-06-02 Thread Ilias Miroslav
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 c

Re: [CMake] execute short program during cmake configuration ?

2016-06-02 Thread Craig Scott
It might be overkill for what you want, but this stack overflow question deals with a very similar situation. On Fri, Jun 3, 2016 at 6:10 AM, Ilias Miroslav wrote: > > Greetings, dear experts, > > > we have (two) short Fortran programs (detection of

Re: [CMake] execute short program during cmake configuration ?

2016-06-02 Thread Alan W. Irwin
On 2016-06-02 20:10- 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

Re: [CMake] execute short program during cmake configuration ?

2016-06-02 Thread Guy Harris
On Jun 2, 2016, at 2:56 PM, Alan W. Irwin wrote: > 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 tha

Re: [CMake] execute short program during cmake configuration ?

2016-06-03 Thread Petr Kmoch
Hi Miro, looks like you want to use the try_run() command ( https://cmake.org/cmake/help/latest/command/try_run.html ). Petr On 2 June 2016 at 22:10, Ilias Miroslav wrote: > > Greetings, dear experts, > > > we have (two) short Fortran programs (detection of integer*4/8 for math > libraries) wh