better have a separate module
This commit is contained in:
parent
6996eb36c0
commit
4470ecfe4a
|
@ -44,8 +44,12 @@ add_library(DEBUG OBJECT "debug.f90")
|
||||||
add_dependencies(DEBUG IO)
|
add_dependencies(DEBUG IO)
|
||||||
list(APPEND OBJECTFILES $<TARGET_OBJECTS:DEBUG>)
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:DEBUG>)
|
||||||
|
|
||||||
add_library(DAMASK_CONFIG OBJECT "config.f90")
|
add_library(DAMASK_LIST OBJECT "list.f90") # LIST is a keyword in CMake
|
||||||
add_dependencies(DAMASK_CONFIG DEBUG)
|
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>)
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:DAMASK_CONFIG>)
|
||||||
|
|
||||||
add_library(HDF5_UTILITIES OBJECT "HDF5_utilities.f90")
|
add_library(HDF5_UTILITIES OBJECT "HDF5_utilities.f90")
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#include "IO.f90"
|
#include "IO.f90"
|
||||||
#include "numerics.f90"
|
#include "numerics.f90"
|
||||||
#include "debug.f90"
|
#include "debug.f90"
|
||||||
|
#include "list.f90"
|
||||||
#include "config.f90"
|
#include "config.f90"
|
||||||
#ifdef DAMASKHDF5
|
#ifdef DAMASKHDF5
|
||||||
#include "HDF5_utilities.f90"
|
#include "HDF5_utilities.f90"
|
||||||
|
|
|
@ -224,7 +224,8 @@ real(pReal) function getFloat(this,key,defaultVal)
|
||||||
real(pReal), intent(in), optional :: defaultVal
|
real(pReal), intent(in), optional :: defaultVal
|
||||||
type(tPartitionedStringList), pointer :: item
|
type(tPartitionedStringList), pointer :: item
|
||||||
logical :: found
|
logical :: found
|
||||||
|
|
||||||
|
getFloat = huge(1.0) ! suppress warning about unitialized value
|
||||||
found = present(defaultVal)
|
found = present(defaultVal)
|
||||||
if (found) getFloat = defaultVal
|
if (found) getFloat = defaultVal
|
||||||
|
|
||||||
|
@ -261,6 +262,7 @@ integer function getInt(this,key,defaultVal)
|
||||||
type(tPartitionedStringList), pointer :: item
|
type(tPartitionedStringList), pointer :: item
|
||||||
logical :: found
|
logical :: found
|
||||||
|
|
||||||
|
getInt = huge(1) ! suppress warning about unitialized value
|
||||||
found = present(defaultVal)
|
found = present(defaultVal)
|
||||||
if (found) getInt = defaultVal
|
if (found) getInt = defaultVal
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue