[CMake] Fortran_FORMAT

Jack Stalnaker jack.stalnaker at gmail.com
Fri Mar 14 10:36:12 EDT 2014


I figured it out. My version of Cmake (2.8.2) does not have the
Fortran_FORMAT property.

Thanks!


On Thu, Mar 13, 2014 at 1:15 PM, Nils Gladitz <nilsgladitz at gmail.com> wrote:

>  On 13.03.2014 17:40, Jack Stalnaker wrote:
>
> Can someone provide an example of Fortran_FORMAT in use? I cannot find
> anything other than a definition of the property online. Does one use
>
>
> I am not much of a Fortran person but:
>
> cmake_minimum_required(VERSION 2.8.12)
>
> project(Foo Fortran)
>
> add_executable(free free.f)
> set_target_properties(free PROPERTIES Fortran_FORMAT "FREE")
>
> add_executable(fixed fixed.f)
> set_target_properties(fixed PROPERTIES Fortran_FORMAT "FIXED")
>
> Produces the following compile command on my system (with the gnu Fortran
> compiler):
>
> /usr/bin/f95    -ffixed-form -c /home/ngladitz/src/test/fortran/fixed.f -o
> CMakeFiles/fixed.dir/fixed.f.o
> /usr/bin/f95    -ffree-form -c /home/ngladitz/src/test/fortran/free.f -o
> CMakeFiles/free.dir/free.f.o
>
>
> The respective -ffixed-form -ffree-form options are compiler specific.
> Which compiler are you using?
>
> Nils
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20140314/e7338d1e/attachment.html>


More information about the CMake mailing list