Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intel-only flags cause errors for GCC #72

Open
AlexanderRichert-NOAA opened this issue Oct 8, 2024 · 0 comments
Open

Intel-only flags cause errors for GCC #72

AlexanderRichert-NOAA opened this issue Oct 8, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@AlexanderRichert-NOAA
Copy link

Description

Building with GCC fails on radmon component because radmon.fd/CMakeLists.txt uses Intel-specific flags. The set(CMAKE_Fortran_FLAGS... line should be in an if block (if (CMAKE_Fortran_COMPILER_ID MATCHES "^Intel$") or something to that effect, possibly accompanied by equivalent flags for other compilers.

Steps to Reproduce/Output

CC=gcc FC=gfortran cmake -B build # I'm using GCC 13.2.1
CC=gcc FC=gfortran cmake --build build

Output:

...
[ 59%] Building Fortran object radmon.fd/shared/CMakeFiles/radmonlib.dir/kinds_radmon.F90.o
gfortran: error: unrecognized command-line option ‘-fp-model’
gfortran: error: unrecognized command-line option ‘-assume’
gfortran: error: unrecognized command-line option ‘-convert’; did you mean ‘--convert=’?
gmake[2]: *** [radmon.fd/shared/CMakeFiles/radmonlib.dir/build.make:75: radmon.fd/shared/CMakeFiles/radmonlib.dir/kinds_radmon.F90.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:1423: radmon.fd/shared/CMakeFiles/radmonlib.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
@AlexanderRichert-NOAA AlexanderRichert-NOAA added the bug Something isn't working label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant