diff --git a/CMakeLists.txt b/CMakeLists.txt index bae75a426..e2e50f8fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,9 +49,7 @@ check_fortran_source_runs("i=0; error stop i; end" f18errorstop SRC_EXT f90) check_fortran_source_compiles("real, allocatable :: array(:, :, :, :, :, :, :, :, :, :); end" f03rank SRC_EXT f90) check_fortran_source_runs("use, intrinsic :: iso_fortran_env, only : real128; real(real128) :: x; x = x+1; end" f03real128) -if(DEFINED CMAKE_MAXIMUM_RANK) - set(CMAKE_MAXIMUM_RANK ${CMAKE_MAXIMUM_RANK}) -endif() +option(CMAKE_MAXIMUM_RANK "Maximum array rank for generated procedures" 4) # --- find preprocessor find_program(FYPP fypp) diff --git a/README.md b/README.md index 5615c4bba..096b9d75d 100644 --- a/README.md +++ b/README.md @@ -127,7 +127,8 @@ Important options are - `-G Ninja` to use the Ninja backend instead of the default Make backend. Other build backends are available with a similar syntax. - `-DCMAKE_INSTALL_PREFIX` is used to provide the install location for the library. - `-DCMAKE_MAXIMUM_RANK` the maximum array rank procedures should be generated for. - The default is 15 for Fortran 2003 compliant compilers, otherwise 7 for compilers not supporting Fortran 2003 completely yet. + The default value is chosen as 4. + The maximum is 15 for Fortran 2003 compliant compilers, otherwise 7 for compilers not supporting Fortran 2003 completely yet. The minimum required rank to compile this project is 4. Compiling with maximum rank 15 can be resource intensive and requires at least 16 GB of memory to allow parallel compilation or 4 GB memory for sequential compilation. - `-DBUILD_SHARED_LIBS` set to `on` in case you want link your application dynamically against the standard library (default: `off`).