Skip to content

cmake: support Aurora NEC compiler

Sergey Kosukhin requested to merge cmake-nec into master

CMake does not support the Aurora NEC compiler and normally mistakes it for GNU. To ensure that we use NEC, we have to run an extra check whether the __NEC__ macro is defined. If that is the case, we can set CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_ON to -fpp, which is the NEC's flag that enforces the preprocessing for .f90 files. Otherwise, the Fortran compiler in use is really GNU and we can extend the compiler flags with -ffree-line-length-none, which is not supported by NEC.

We still do not support the shared libraries with NEC. We will revisit this later when we drop the Autotools build system and switch from libcheck to gtest.

Merge request reports

Loading