grimme-lab / mctc-lib

Modular computation tool chain library
https://grimme-lab.github.io/mctc-lib
Apache License 2.0
15 stars 17 forks source link

NVHPC Fortran requires -Mbackslash flag #67

Closed jeffhammond closed 1 month ago

jeffhammond commented 1 month ago

When I try to compile with NVHPC Fortran, it fails like this:

[ 58%] Built target mctc-lib-lib
[ 59%] Building Fortran object app/CMakeFiles/mctc-convert.dir/main.f90.o
NVFORTRAN-S-0026-Unmatched quote (/home/jehammond/MOLPRO/mctc-lib/app/main.f90: 284)
NVFORTRAN-S-0026-Unmatched quote (/home/jehammond/MOLPRO/mctc-lib/app/main.f90: 297)
NVFORTRAN/x86-64 Linux 24.7-0: compilation completed with severe errors
gmake[2]: *** [app/CMakeFiles/mctc-convert.dir/build.make:75: app/CMakeFiles/mctc-convert.dir/main.f90.o] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:279: app/CMakeFiles/mctc-convert.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2

The solution is FFLAGS=-Mbackslash FC=nvfortran cmake .. && cmake --build ., i.e. to add the -Mbackslash flag.

Please add this to your CMake logic. Thanks.