save before update base
This commit is contained in:
parent
018668f474
commit
9d89570ffb
|
@ -144,10 +144,10 @@ set (STANDARD_CHECK_gfortran "-std=f2008ts -pedantic-errors" )
|
||||||
# all:
|
# all:
|
||||||
# -name as_is: case sensitive Fortran!
|
# -name as_is: case sensitive Fortran!
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
set (COMPILE_OPTIONS_ifort "${COMPILE_OPTIONS_ifort} -DDAMASKVERSION=\"${DAMASK_V}\"" )
|
set (COMPILE_OPTIONS_ifort "${COMPILE_OPTIONS_ifort} -DDAMASKVERSION=${DAMASK_V}" )
|
||||||
set (COMPILE_OPTIONS_ifort "${COMPILE_OPTIONS_ifort} -fpp" )
|
set (COMPILE_OPTIONS_ifort "${COMPILE_OPTIONS_ifort} -fpp" )
|
||||||
set (COMPILE_OPTIONS_ifort "${COMPILE_OPTIONS_ifort} -ftz" )
|
set (COMPILE_OPTIONS_ifort "${COMPILE_OPTIONS_ifort} -ftz" )
|
||||||
set (COMPILE_OPTIONS_ifort "${COMPILE_OPTIONS_ifort} -assume byterecl,fpe_summary" )
|
set (COMPILE_OPTIONS_ifort "${COMPILE_OPTIONS_ifort} -assume byterecl,fpe_summary")
|
||||||
set (COMPILE_OPTIONS_ifort "${COMPILE_OPTIONS_ifort} -diag-disable 5268" )
|
set (COMPILE_OPTIONS_ifort "${COMPILE_OPTIONS_ifort} -diag-disable 5268" )
|
||||||
set (COMPILE_OPTIONS_ifort "${COMPILE_OPTIONS_ifort} -warn declarations" )
|
set (COMPILE_OPTIONS_ifort "${COMPILE_OPTIONS_ifort} -warn declarations" )
|
||||||
set (COMPILE_OPTIONS_ifort "${COMPILE_OPTIONS_ifort} -warn general" )
|
set (COMPILE_OPTIONS_ifort "${COMPILE_OPTIONS_ifort} -warn general" )
|
||||||
|
|
|
@ -1,13 +1,47 @@
|
||||||
# The dependency detection for Fortran is not working in CMake
|
# The dependency detection in CMake is not functioning for Fortran
|
||||||
# Have to define them explicitly
|
# !!! EXPLICIT DEPENDENCY DECLARATION !!!
|
||||||
|
###################################################################################################
|
||||||
|
# fno-range-check: Disable range checking on results of simplification of constant expressions during compilation
|
||||||
|
# --> allows the definition of DAMASK_NaN
|
||||||
|
#-fall-intrinsics: all intrinsic procedures (including the GNU-specific extensions) are accepted. -Wintrinsics-std will be ignored
|
||||||
|
# and no user-defined procedure with the same name as any intrinsic will be called except when it is explicitly declared external
|
||||||
|
# --> allows the use of 'isnan'
|
||||||
|
#-fno-fast-math:
|
||||||
|
# --> otherwise, when setting -ffast-math, isnan always evaluates to false (I would call it a bug)
|
||||||
|
###################################################################################################
|
||||||
|
if (Fortran_COMPILER_NAME MATCHES "ifort.*")
|
||||||
|
set (SPEICAL_FLAGS "")
|
||||||
|
elseif (Fortran_COMPILER_NAME MATCHES "gfortran.*")
|
||||||
|
set (SPEICAL_FLAGS "-fno-range-check -fall-intrinsics -fno-fast-math")
|
||||||
|
else (Fortran_COMPILER_NAME MATCHES "ifort.*")
|
||||||
|
message (FATAL_ERROR "Unknown Fortrna compiler.")
|
||||||
|
endif (Fortran_COMPILER_NAME MATCHES "ifort.*")
|
||||||
|
|
||||||
|
set (CMAKE_Fortran_FLAGS_RELEASE "${DAMASK_Fortran_FLAGS_RELEASE} ${SPEICAL_FLAGS}")
|
||||||
|
|
||||||
add_library(DAMASK_prec "prec.f90")
|
add_library(DAMASK_prec "prec.f90")
|
||||||
|
|
||||||
###################################################################################################
|
set (CMAKE_Fortran_FLAGS_RELEASE "${DAMASK_Fortran_FLAGS_RELEASE}")
|
||||||
|
|
||||||
|
###################################################################################################
|
||||||
|
# -diag-disable 7410 should disable warning about directory statement in inquire function,
|
||||||
|
# but does not work. hence the other 2 statements
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
if (SPECTRAL)
|
if (SPECTRAL)
|
||||||
|
if (Fortran_COMPILER_NAME MATCHES "ifort.*")
|
||||||
|
set (SPEICAL_FLAGS "-diag-remark 7410 -stand none -warn nostderrors")
|
||||||
|
elseif (Fortran_COMPILER_NAME MATCHES "gfortran.*")
|
||||||
|
set (SPEICAL_FLAGS "-fall-intrinsics")
|
||||||
|
else (Fortran_COMPILER_NAME MATCHES "ifort.*")
|
||||||
|
message (FATAL_ERROR "Unknown Fortrna compiler.")
|
||||||
|
endif (Fortran_COMPILER_NAME MATCHES "ifort.*")
|
||||||
|
|
||||||
|
set (CMAKE_Fortran_FLAGS_RELEASE "${DAMASK_Fortran_FLAGS_RELEASE} ${SPEICAL_FLAGS}")
|
||||||
|
|
||||||
add_library(DAMASK_interface "spectral_interface.f90")
|
add_library(DAMASK_interface "spectral_interface.f90")
|
||||||
target_link_libraries(DAMASK_interface DAMASK_prec)
|
target_link_libraries(DAMASK_interface DAMASK_prec)
|
||||||
|
|
||||||
|
set (CMAKE_Fortran_FLAGS_RELEASE "${DAMASK_Fortran_FLAGS_RELEASE}")
|
||||||
endif(SPECTRAL)
|
endif(SPECTRAL)
|
||||||
|
|
||||||
add_library(DAMASK_IO "IO.f90")
|
add_library(DAMASK_IO "IO.f90")
|
||||||
|
|
Loading…
Reference in New Issue