N.I.M.R.O.D.  
Functions/Subroutines

CMakeLists.txt File Reference

Functions/Subroutines

 cmake_minimum_required (VERSION 2.6) project(Emrode) enable_language(Fortran) if(MPI_FOUND) set(CMAKE_Fortran_COMPILER mpif90) else(MPI_FOUND) set(CMAKE_Fortran_COMPILER gfortran) endif(MPI_FOUND) get_filename_component(Fortran_COMPILER_NAME $
NAME message ("Fortran compiler: "${Fortran_COMPILER_NAME}) if(Fortran_COMPILER_NAME STREQUAL"gfortran") set(CMAKE_Fortran_FLAGS"-g -fbounds-check -O3 --free-form $
 elseif (Fortran_COMPILER_NAME STREQUAL"ifort") set(CMAKE_Fortran_FLAGS"-g -O3 -free $
 elseif (Fortran_COMPILER_NAME STREQUAL"mpif90") set(CMAKE_Fortran_FLAGS"-g -fbounds-check -O3 --free-form $

Function Documentation

cmake_minimum_required ( VERSION 2.  6)

Definition at line 5 of file CMakeLists.txt.

             : $ENV{GFORTRAN} or  $ENV{MPIF90} or  $ENV{IFORT}
#              should be set !
#
#########################################################################

FIND_PACKAGE(MPI)
if(MPI_FOUND)
 set(CMAKE_Fortran_COMPILER mpif90)
else(MPI_FOUND)
 set(CMAKE_Fortran_COMPILER gfortran)
endif(MPI_FOUND)

get_filename_component (Fortran_COMPILER_NAME ${CMAKE_Fortran_COMPILER} NAME)
elseif ( Fortran_COMPILER_NAME STREQUAL"mpif90"  )

Definition at line 43 of file CMakeLists.txt.

                                                             {CMAKE_Fortran_FLAGS}")
elseif ( Fortran_COMPILER_NAME STREQUAL"ifort"  )

Definition at line 40 of file CMakeLists.txt.

                                        {CMAKE_Fortran_FLAGS}")
NAME message ( )

Definition at line 27 of file CMakeLists.txt.

                          : " ${Fortran_COMPILER_NAME})


#########################################################################
#
# Compiler Flags
# --------------
#
#########################################################################

if (Fortran_COMPILER_NAME STREQUAL "gfortran")
  # gfortran
  set(CMAKE_Fortran_FLAGS "-g -fbounds-check -O3 --free-form ${CMAKE_Fortran_FLAGS}")