Skip to content

Commit

Permalink
modification of CMake and Makefile
Browse files Browse the repository at this point in the history
Merge branch 'stat_cmake' into stat_dev
  • Loading branch information
jvdp1 committed Jan 21, 2020
2 parents e96c12d + 4274f0d commit 3266163
Show file tree
Hide file tree
Showing 11 changed files with 4,867 additions and 6 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ endif()
include(CheckFortranSourceCompiles)
include(CheckFortranSourceRuns)
check_fortran_source_compiles("error stop i; end" f18errorstop SRC_EXT f90)
check_fortran_source_compiles("real, allocatable :: array(:, :, :, :, :, :, :, :, :, :); end" f03rank SRC_EXT f90)
check_fortran_source_runs("use, intrinsic :: iso_fortran_env, only : real128; real(real128) :: x; x = x+1; end" f03real128)

add_subdirectory(src)
10 changes: 8 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ set(SRC
stdlib_experimental_kinds.f90
stdlib_experimental_optval.f90
stdlib_experimental_system.F90
stdlib_experimental_stats_mean.f90
stdlib_experimental_stats.f90
)

add_library(fortran_stdlib ${SRC})
Expand All @@ -25,6 +23,14 @@ else()
target_sources(fortran_stdlib PRIVATE f08estop.f90)
endif()

if(f03rank)
target_sources(fortran_stdlib PRIVATE f03_stdlib_experimental_stats.f90)
target_sources(fortran_stdlib PRIVATE f03_stdlib_experimental_stats_mean.f90)
else()
target_sources(fortran_stdlib PRIVATE f90_stdlib_experimental_stats.f90)
target_sources(fortran_stdlib PRIVATE f90_stdlib_experimental_stats_mean.f90)
endif()

add_subdirectory(tests)

install(TARGETS fortran_stdlib
Expand Down
8 changes: 4 additions & 4 deletions src/Makefile.manual
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ SRC = stdlib_experimental_ascii.f90 \
stdlib_experimental_optval.f90 \
stdlib_experimental_kinds.f90 \
f18estop.f90 \
stdlib_experimental_stats.f90 \
stdlib_experimental_stats_mean.f90
f03_stdlib_experimental_stats.f90 \
f03_stdlib_experimental_stats_mean.f90

LIB = libstdlib.a

Expand Down Expand Up @@ -36,7 +36,7 @@ stdlib_experimental_io.o: \
stdlib_experimental_optval.o \
stdlib_experimental_kinds.o
stdlib_experimental_optval.o: stdlib_experimental_kinds.o
stdlib_experimental_stats_mean.o: \
f03_stdlib_experimental_stats_mean.o: \
stdlib_experimental_optval.o \
stdlib_experimental_kinds.o \
stdlib_experimental_stats.o
f03_stdlib_experimental_stats.o
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ end function mean_2_int64_dp




module function mean_3_all_sp_sp(x) result(res)
real(sp), intent(in) :: x(:,:,:)
real(sp) :: res
Expand Down
File renamed without changes.
Loading

0 comments on commit 3266163

Please sign in to comment.