File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,12 +12,12 @@ endif()
1212
1313# Check if MPI is present. This should succeed if
1414# the compilers were set to mpifort and mpicc.
15- find_package (MPI REQUIRED )
1615
1716# Set default compiler = GNU if none was specified.
1817if (NOT COMPILER)
1918 set (COMPILER "${CMAKE_Fortran_COMPILER_ID} " CACHE STRING "Choose compiler toolchain." FORCE )
2019 set_property (CACHE COMPILER PROPERTY STRINGS "GNU" "Intel" )
20+ set_property (CACHE COMPILER PROPERTY STRINGS "GNU" "Intel" "LFortran" )
2121endif ()
2222
2323# Set compiler specific flags.
@@ -52,6 +52,12 @@ elseif(COMPILER STREQUAL "NVHPC")
5252 set (CMAKE_Fortran_FLAGS "-fPIC" )
5353 set (CMAKE_Fortran_FLAGS_DEBUG "-g -O0" )
5454 set (CMAKE_Fortran_FLAGS_RELEASE "-Ofast" )
55+ elseif (COMPILER STREQUAL "LFortran" )
56+ add_compile_definitions (CPRLFORTRAN )
57+ # There is an issue, some modules require --cpp as a flag in their compilation
58+ # some flat out break, if we put --cpp
59+ # For more information see https://github.com/HPSCTerrSys/eCLM/issues/98.
60+ # set(CMAKE_Fortran_FLAGS "--cpp")
5561else ()
5662 message (FATAL_ERROR "COMPILER='${COMPILER} ' is not supported." )
5763endif ()
You can’t perform that action at this time.
0 commit comments