better have a separate module

This commit is contained in:
Martin Diehl 2019-03-28 06:52:17 +01:00
parent 6996eb36c0
commit 4470ecfe4a
3 changed files with 10 additions and 3 deletions

View File

@ -44,8 +44,12 @@ add_library(DEBUG OBJECT "debug.f90")
add_dependencies(DEBUG IO)
list(APPEND OBJECTFILES $<TARGET_OBJECTS:DEBUG>)
add_library(DAMASK_CONFIG OBJECT "config.f90")
add_dependencies(DAMASK_CONFIG DEBUG)
add_library(DAMASK_LIST OBJECT "list.f90") # LIST is a keyword in CMake
add_dependencies(DAMASK_LIST IO)
list(APPEND OBJECTFILES $<TARGET_OBJECTS:DAMASK_LIST>)
add_library(DAMASK_CONFIG OBJECT "config.f90") # CONFIG is a keyword in CMake
add_dependencies(DAMASK_CONFIG DAMASK_LIST DEBUG)
list(APPEND OBJECTFILES $<TARGET_OBJECTS:DAMASK_CONFIG>)
add_library(HDF5_UTILITIES OBJECT "HDF5_utilities.f90")

View File

@ -6,6 +6,7 @@
#include "IO.f90"
#include "numerics.f90"
#include "debug.f90"
#include "list.f90"
#include "config.f90"
#ifdef DAMASKHDF5
#include "HDF5_utilities.f90"

View File

@ -224,7 +224,8 @@ real(pReal) function getFloat(this,key,defaultVal)
real(pReal), intent(in), optional :: defaultVal
type(tPartitionedStringList), pointer :: item
logical :: found
getFloat = huge(1.0) ! suppress warning about unitialized value
found = present(defaultVal)
if (found) getFloat = defaultVal
@ -261,6 +262,7 @@ integer function getInt(this,key,defaultVal)
type(tPartitionedStringList), pointer :: item
logical :: found
getInt = huge(1) ! suppress warning about unitialized value
found = present(defaultVal)
if (found) getInt = defaultVal