diff --git a/CMakeLists.txt b/CMakeLists.txt index 1927c44..db53ea0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,8 +11,12 @@ if(NOT realbits) set(realbits 64) endif() -# --- other libraries -add_library(maptran SHARED src/maptran.F90 src/vallado.F90) +if(NOT WIN32) + option(BUILD_SHARED_LIBS "Shared libraries .so. Feel free to turn off." ON) +endif() + +# --- Maptran library +add_library(maptran src/maptran.F90 src/vallado.F90) target_compile_options(maptran PRIVATE ${FFLAGS}) target_compile_definitions(maptran PUBLIC REALBITS=${realbits}) # --- testing diff --git a/src/vallado.F90 b/src/vallado.F90 index cd04032..aa9cb5c 100644 --- a/src/vallado.F90 +++ b/src/vallado.F90 @@ -14,7 +14,7 @@ module vallado real(wp), parameter :: pi = 4._wp * atan(1.0_wp) - type,public :: time + type,public :: datetime integer :: year, month, day, hour, minute real(wp) :: second end type @@ -133,7 +133,7 @@ elemental real(wp) function toJulian(t) result(jd) ! ----- ! JD: Julian Date - type(time), intent(in) :: t + type(datetime), intent(in) :: t real(wp) :: B, y, m y = t%year diff --git a/tests/test_mod.f90 b/tests/test_mod.f90 index cfe5619..0942559 100644 --- a/tests/test_mod.f90 +++ b/tests/test_mod.f90 @@ -23,7 +23,7 @@ program Test deg0 = [15,30,45], & aaz = [33,43,53] -type(time), parameter :: t0 = time(2014,4,6,8,0,0) ! UTC +type(datetime), parameter :: t0 = datetime(2014,4,6,8,0,0) ! UTC real(wp), parameter :: jd0 = 2456753.833333_wp @@ -190,5 +190,5 @@ program Test err_msg='angle_sep') -print *,'OK: Maptran' +print *,'OK: Maptran ',storage_size(0._wp),' bits' end program