Skip to content

CMake uses different compiler flags to autotools #76

@harshula

Description

@harshula

Please note that the static library built via CMake is built with different flags compared to when it is built with Autotools.

e.g. Cmake:

/usr/bin/f95   -O3 -DNDEBUG -O3 -Jinclude -c [...]/datetime-fortran.git/src/datetime_module.f90 -o CMakeFiles/datetime.dir/src/datetime_module.f90.o
...
/usr/bin/ar qc lib/libdatetime.a CMakeFiles/datetime.dir/src/datetime_module.f90.o
/usr/bin/ranlib lib/libdatetime.a

e.g. Autotools:

gfortran -c -Wall datetime_module.f90
...
ar ruv libdatetime.a datetime_module.o
ar: `u' modifier ignored since `D' is the default (see `U')
ar: creating libdatetime.a
a - datetime_module.o

Environment:

$ gfortran --version
GNU Fortran (Debian 12.2.0-3) 12.2.0

$ ar --version
GNU ar (GNU Binutils for Debian) 2.39

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions