Skip to content

Commit

Permalink
Prepare to release slatec 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
MehdiChinoune committed Apr 11, 2019
1 parent 4552820 commit 4f4b7cb
Show file tree
Hide file tree
Showing 16 changed files with 73 additions and 212 deletions.
12 changes: 9 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ cmake_minimum_required(VERSION 3.7)

project(slatec Fortran)

set( slatec_MAJOR_VERSION 4 )
set( slatec_MINOR_VERSION 2 )
set( slatec_VERSION ${slatec_MAJOR_VERSION}.${slatec_MINOR_VERSION} )

set ( CMAKE_CONFIGURATION_TYPES "Debug" "Release" "CodeCoverage" )

enable_testing()
Expand All @@ -15,14 +19,16 @@ endif()

if ( "${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU" )

set( CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS} -O3 -std=f2003 -fimplicit-none" )
set( CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS} -Wall -Wno-unused-dummy-argument -fcheck=all -g -O0 -std=f2018" )
set( CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS} -O3" )
set( CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS} -Wall -Wno-unused-dummy-argument \
-fcheck=all -ffpe-trap=zero,overflow,invalid -fbacktrace -g -O0 -std=f2018" )
set ( CMAKE_Fortran_FLAGS_CODECOVERAGE "--coverage -g -O0" )

elseif ( "${CMAKE_Fortran_COMPILER_ID}" MATCHES "Intel" )

set( CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS} -O3" )
set( CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS} -warn all -check all -stand f18 -g" )
set( CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS} -warn all -traceback \
-fpe0 -g -check all -stand f18" )
set ( CMAKE_Fortran_FLAGS_CODECOVERAGE "-prof-gen:srcpos -prof-dir=${CMAKE_BINARY_DIR}/prof/ -g -O0" )

elseif ( "${CMAKE_Fortran_COMPILER_ID}" MATCHES "Flang" )
Expand Down
38 changes: 5 additions & 33 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,37 +1,9 @@

add_library(slatec SHARED "aaaaaa.f90" )
file(GLOB_RECURSE srcs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} CONFIGURE_DEPENDS ./*.f90 )

add_subdirectory( approximation )
target_link_libraries(slatec approximation )
set( CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/modules )

add_subdirectory( data_handling )
target_link_libraries(slatec data_handling )
add_library(slatec SHARED ${srcs} )

add_subdirectory( diff_integ )
target_link_libraries(slatec diff_integ )

add_subdirectory( diff_integ_eq )
target_link_libraries(slatec diff_integ_eq )

add_subdirectory( integ_trans )
target_link_libraries(slatec integ_trans )

add_subdirectory( interpolation )
target_link_libraries(slatec interpolation )

add_subdirectory( linear )
target_link_libraries(slatec linear )

add_subdirectory( nonlin_eq )
target_link_libraries(slatec nonlin_eq )

add_subdirectory( service )
target_link_libraries(slatec service )

add_subdirectory( special_functions )
target_link_libraries(slatec special_functions )

add_subdirectory( optimization )
target_link_libraries(slatec optimization )

install(TARGETS slatec LIBRARY DESTINATION lib RUNTIME DESTINATION bin)
install(TARGETS slatec LIBRARY DESTINATION lib RUNTIME DESTINATION bin)
install(DIRECTORY ${CMAKE_BINARY_DIR}/modules DESTINATION include PATTERN "*_genmod*" EXCLUDE )
2 changes: 1 addition & 1 deletion src/aaaaaa.f90
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,5 @@ SUBROUTINE AAAAAA(Ver)

CHARACTER*(*) Ver
!* FIRST EXECUTABLE STATEMENT AAAAAA
Ver = ' 4.1'
Ver = ' 4.2'
END SUBROUTINE AAAAAA
6 changes: 0 additions & 6 deletions src/approximation/CMakeLists.txt

This file was deleted.

6 changes: 0 additions & 6 deletions src/data_handling/CMakeLists.txt

This file was deleted.

6 changes: 0 additions & 6 deletions src/diff_integ/CMakeLists.txt

This file was deleted.

6 changes: 0 additions & 6 deletions src/diff_integ_eq/CMakeLists.txt

This file was deleted.

4 changes: 0 additions & 4 deletions src/integ_trans/CMakeLists.txt

This file was deleted.

6 changes: 0 additions & 6 deletions src/interpolation/CMakeLists.txt

This file was deleted.

6 changes: 0 additions & 6 deletions src/linear/CMakeLists.txt

This file was deleted.

6 changes: 0 additions & 6 deletions src/nonlin_eq/CMakeLists.txt

This file was deleted.

6 changes: 0 additions & 6 deletions src/optimization/CMakeLists.txt

This file was deleted.

4 changes: 0 additions & 4 deletions src/service/CMakeLists.txt

This file was deleted.

6 changes: 0 additions & 6 deletions src/special_functions/CMakeLists.txt

This file was deleted.

169 changes: 57 additions & 112 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,175 +1,120 @@
FILE(GLOB tests RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} test*.f90)
FILE(GLOB tests RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} test*.f90 )

add_executable(test_aaaaaa test_aaaaaa.f90)
target_link_libraries(test_aaaaaa slatec )
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/modules )

add_executable(test_arrays_01 test_arrays_01.f90)
target_link_libraries(test_arrays_01 data_handling )
add_executable(test_aaaaaa test_aaaaaa.f90 )

add_executable(test_blas_01 test_blas_01.f90)
target_link_libraries(test_blas_01 linear )
add_executable(test_arrays_01 test_arrays_01.f90 )

add_executable(test_blas_01 test_blas_01.f90 )

add_executable(test_blas_02 test_blas_02.f90 chkxer.f90 )
target_link_libraries(test_blas_02 linear )

add_executable(test_blas_03 test_blas_03.f90 chkxer.f90)
target_link_libraries(test_blas_03 linear )
add_executable(test_blas_03 test_blas_03.f90 chkxer.f90 )

add_executable(test_blas_04 test_blas_04.f90 chkxer.f90)
target_link_libraries(test_blas_04 linear )
add_executable(test_blas_04 test_blas_04.f90 chkxer.f90 )

add_executable(test_bspline_01 test_bspline_01.f90)
target_link_libraries(test_bspline_01 interpolation diff_integ )
add_executable(test_bspline_01 test_bspline_01.f90 )

add_executable(test_bspline_02 test_bspline_02.f90)
target_link_libraries(test_bspline_02 interpolation diff_integ )
add_executable(test_bspline_02 test_bspline_02.f90 )

add_executable(test_dassl_01 test_dassl_01.f90)
target_link_libraries(test_dassl_01 diff_integ_eq )
add_executable(test_dassl_01 test_dassl_01.f90 )

add_executable(test_dassl_02 test_dassl_02.f90)
target_link_libraries(test_dassl_02 diff_integ_eq )
add_executable(test_dassl_02 test_dassl_02.f90 )

add_executable(test_depac_01 test_depac_01.f90 pass.f90)
target_link_libraries(test_depac_01 diff_integ_eq )
target_include_directories(test_depac_01 PRIVATE ${CMAKE_BINARY_DIR}/src/diff_integ_eq/ )
add_executable(test_depac_01 test_depac_01.f90 pass.f90 )

add_executable(test_depac_02 test_depac_02.f90 pass.f90)
target_link_libraries(test_depac_02 diff_integ_eq )
target_include_directories(test_depac_02 PRIVATE ${CMAKE_BINARY_DIR}/src/diff_integ_eq/ )
add_executable(test_depac_02 test_depac_02.f90 pass.f90 )

add_executable(test_eispack_01 test_eispack_01.f90)
target_link_libraries(test_eispack_01 linear )
add_executable(test_eispack_01 test_eispack_01.f90 )

add_executable(test_fishpack_01 test_fishpack_01.f90)
target_link_libraries(test_fishpack_01 diff_integ_eq )
add_executable(test_fishpack_01 test_fishpack_01.f90 )

add_executable(test_fishpack_02 test_fishpack_02.f90)
target_link_libraries(test_fishpack_02 diff_integ_eq )
add_executable(test_fishpack_02 test_fishpack_02.f90 )

add_executable(test_fitting_01 test_fitting_01.f90)
target_link_libraries(test_fitting_01 approximation )
add_executable(test_fitting_01 test_fitting_01.f90 )

add_executable(test_fitting_02 test_fitting_02.f90)
target_link_libraries(test_fitting_02 approximation )
add_executable(test_fitting_02 test_fitting_02.f90 )

add_executable(test_integration_01 test_integration_01.f90)
target_link_libraries(test_integration_01 diff_integ )
add_executable(test_integration_01 test_integration_01.f90 )

add_executable(test_integration_02 test_integration_02.f90)
target_link_libraries(test_integration_02 diff_integ )
add_executable(test_integration_02 test_integration_02.f90 )

add_executable(test_interpolation_01 test_interpolation_01.f90)
target_link_libraries(test_interpolation_01 interpolation )
add_executable(test_interpolation_01 test_interpolation_01.f90 )

add_executable(test_lineq_01 test_lineq_01.f90)
target_link_libraries(test_lineq_01 linear )
add_executable(test_lineq_01 test_lineq_01.f90 )

add_executable(test_lineq_02 test_lineq_02.f90)
target_link_libraries(test_lineq_02 linear )
add_executable(test_lineq_02 test_lineq_02.f90 )

add_executable(test_linpack_01 test_linpack_01.f90)
target_link_libraries(test_linpack_01 linear )
add_executable(test_linpack_01 test_linpack_01.f90 )

add_executable(test_minpack_01 test_minpack_01.f90 pass.f90)
target_link_libraries(test_minpack_01 approximation nonlin_eq )
add_executable(test_minpack_01 test_minpack_01.f90 pass.f90 )

add_executable(test_minpack_02 test_minpack_02.f90 pass.f90)
target_link_libraries(test_minpack_02 approximation nonlin_eq )
add_executable(test_minpack_02 test_minpack_02.f90 pass.f90 )

add_executable(test_minpack_03 test_minpack_03.f90 pass.f90)
target_link_libraries(test_minpack_03 approximation interpolation )
add_executable(test_minpack_03 test_minpack_03.f90 pass.f90 )

add_executable(test_minpack_04 test_minpack_04.f90 pass.f90)
target_link_libraries(test_minpack_04 approximation interpolation )
add_executable(test_minpack_04 test_minpack_04.f90 pass.f90 )

add_executable(test_pchip_01 test_pchip_01.f90 comp.f90)
target_link_libraries(test_pchip_01 interpolation special_functions )
add_executable(test_pchip_01 test_pchip_01.f90 comp.f90 )

add_executable(test_pchip_02 test_pchip_02.f90 comp.f90)
target_link_libraries(test_pchip_02 interpolation special_functions )
add_executable(test_pchip_02 test_pchip_02.f90 comp.f90 )

add_executable(test_quadpack_01 test_quadpack_01.f90)
target_link_libraries(test_quadpack_01 diff_integ )
add_executable(test_quadpack_01 test_quadpack_01.f90 )

add_executable(test_quadpack_02 test_quadpack_02.f90)
target_link_libraries(test_quadpack_02 diff_integ )
add_executable(test_quadpack_02 test_quadpack_02.f90 )

add_executable(test_roots_01 test_roots_01.f90 pass.f90)
target_link_libraries(test_roots_01 nonlin_eq )
add_executable(test_roots_01 test_roots_01.f90 pass.f90 )

add_executable(test_sdrive_01 test_sdrive_01.f90)
target_link_libraries(test_sdrive_01 diff_integ_eq )
add_executable(test_sdrive_01 test_sdrive_01.f90 )

add_executable(test_sdrive_02 test_sdrive_02.f90)
target_link_libraries(test_sdrive_02 diff_integ_eq )
add_executable(test_sdrive_02 test_sdrive_02.f90 )

add_executable(test_sdrive_03 test_sdrive_03.f90)
target_link_libraries(test_sdrive_03 diff_integ_eq )
add_executable(test_sdrive_03 test_sdrive_03.f90 )

add_executable(test_slap_01 test_slap_01.f90 ismpl.f90)
target_link_libraries(test_slap_01 linear special_functions )
target_include_directories(test_slap_01 PRIVATE ${CMAKE_BINARY_DIR}/src/linear/ )
add_executable(test_slap_01 test_slap_01.f90 ismpl.f90 )

add_executable(test_slap_02 test_slap_02.f90 ismpl.f90)
target_link_libraries(test_slap_02 linear special_functions )
target_include_directories(test_slap_02 PRIVATE ${CMAKE_BINARY_DIR}/src/linear/ )
add_executable(test_slap_02 test_slap_02.f90 ismpl.f90 )

add_executable(test_specfun_01 test_specfun_01.f90)
target_link_libraries(test_specfun_01 special_functions )
add_executable(test_specfun_01 test_specfun_01.f90 )

add_executable(test_specfun_02 test_specfun_02.f90)
target_link_libraries(test_specfun_02 special_functions )
add_executable(test_specfun_02 test_specfun_02.f90 )

add_executable(test_specfun_03 test_specfun_03.f90)
target_link_libraries(test_specfun_03 special_functions )
add_executable(test_specfun_03 test_specfun_03.f90 )

add_executable(test_specfun_04 test_specfun_04.f90)
target_link_libraries(test_specfun_04 special_functions diff_integ )
add_executable(test_specfun_04 test_specfun_04.f90 )

add_executable(test_specfun_05 test_specfun_05.f90)
target_link_libraries(test_specfun_05 special_functions diff_integ )
add_executable(test_specfun_05 test_specfun_05.f90 )

add_executable(test_specfun_06 test_specfun_06.f90)
target_link_libraries(test_specfun_06 special_functions )
add_executable(test_specfun_06 test_specfun_06.f90 )

add_executable(test_specfun_07 test_specfun_07.f90)
target_link_libraries(test_specfun_07 special_functions )
add_executable(test_specfun_07 test_specfun_07.f90 )

add_executable(test_specfun_08 test_specfun_08.f90)
target_link_libraries(test_specfun_08 special_functions )
add_executable(test_specfun_08 test_specfun_08.f90 )

add_executable(test_specfun_09 test_specfun_09.f90)
target_link_libraries(test_specfun_09 special_functions )
add_executable(test_specfun_09 test_specfun_09.f90 )

add_executable(test_specfun_10 test_specfun_10.f90)
target_link_libraries(test_specfun_10 special_functions )
add_executable(test_specfun_10 test_specfun_10.f90 )

add_executable(test_specfun_11 test_specfun_11.f90)
target_link_libraries(test_specfun_11 special_functions )
add_executable(test_specfun_11 test_specfun_11.f90 )

add_executable(test_specfun_12 test_specfun_12.f90)
target_link_libraries(test_specfun_12 special_functions )
add_executable(test_specfun_12 test_specfun_12.f90 )

add_executable(test_specfun_13 test_specfun_13.f90)
target_link_libraries(test_specfun_13 special_functions )
add_executable(test_specfun_13 test_specfun_13.f90 )

add_executable(test_splp_01 test_splp_01.f90 pass.f90)
target_link_libraries(test_splp_01 optimization approximation )
add_executable(test_splp_01 test_splp_01.f90 pass.f90 )

add_executable(test_splp_02 test_splp_02.f90 pass.f90)
target_link_libraries(test_splp_02 optimization approximation )
add_executable(test_splp_02 test_splp_02.f90 pass.f90 )

add_executable(test_wigner_01 test_wigner_01.f90)
target_link_libraries(test_wigner_01 special_functions )
add_executable(test_wigner_01 test_wigner_01.f90 )

add_executable(test_wigner_02 test_wigner_02.f90)
target_link_libraries(test_wigner_02 special_functions )
add_executable(test_wigner_02 test_wigner_02.f90 )

add_library(get_argument OBJECT get_argument.f90)

foreach( tst ${tests} )
STRING(REPLACE ".f90" "" exe ${tst})
target_link_libraries(${exe} slatec )
target_link_libraries(${exe} $<TARGET_OBJECTS:get_argument>)
add_test(NAME ${exe} COMMAND ./${exe} 2 WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
set_tests_properties(${exe} PROPERTIES FAIL_REGULAR_EXPRESSION "[^a-z]Failed;FAILED")
Expand Down
Loading

0 comments on commit 4f4b7cb

Please sign in to comment.