cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
set(CMAKE_USER_MAKE_RULES_OVERRIDE ${CMAKE_SOURCE_DIR}/cmake/UserOverride.cmake)
enable_language(Fortran)
project(fortranutils)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
set(WITH_LAPACK yes
CACHE BOOL "Build with LAPACK support")
set(WITH_HDF5 no
CACHE BOOL "Build with HDF5 support")
# Make sure that CMAKE_BUILD_TYPE is either Debug or Release:
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug
CACHE STRING "Build type (Debug, Release)" FORCE)
endif ()
if (NOT (CMAKE_BUILD_TYPE STREQUAL "Debug" OR
CMAKE_BUILD_TYPE STREQUAL "Release"))
message("${CMAKE_BUILD_TYPE}")
message(FATAL_ERROR "CMAKE_BUILD_TYPE must be one of: Debug, Release (current value: '${CMAKE_BUILD_TYPE}')")
endif ()
if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
execute_process(COMMAND ${CMAKE_Fortran_COMPILER} -dumpversion
OUTPUT_VARIABLE GCC_VERSION)
if (GCC_VERSION VERSION_LESS 4.5)
set(common "-std=f2008 -Wall -Wextra -Wimplicit-interface -fPIC -Werror -fmax-errors=1")
set(CMAKE_Fortran_FLAGS_RELEASE "${common} -O3 -march=native -ffast-math -funroll-loops")
set(CMAKE_Fortran_FLAGS_DEBUG "${common} -g -fbounds-check -fcheck-array-temporaries -fbacktrace")
endif()
# gfortran
# Enable this if you want to check for single/double corruption (and use
# the Debug build):
#set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -fdefault-real-8")
endif ()
enable_testing()
add_subdirectory(src)
add_subdirectory(tests)
message("\n")
message("Configuration results")
message("---------------------")
message("Fortran compiler: ${CMAKE_Fortran_COMPILER}")
message("Build type: ${CMAKE_BUILD_TYPE}")
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
message("Fortran compiler flags: ${CMAKE_Fortran_FLAGS_DEBUG}")
else ()
message("Fortran compiler flags: ${CMAKE_Fortran_FLAGS_RELEASE}")
endif ()
message("Installation prefix: ${CMAKE_INSTALL_PREFIX}")
message("With LAPACK: ${WITH_LAPACK}")
message("With HDF5: ${WITH_HDF5}")
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
### Fortran 程序的各种实用程序.zip 资源描述 #### 概述 "Fortran 程序的各种实用程序.zip" 是一个综合性的资源包,包含了一系列实用的 Fortran 程序和工具。这些工具旨在帮助程序员更高效地开发、调试和优化 Fortran 代码,特别适用于科学计算和工程模拟等领域。该资源包包括示例代码、库、脚本和文档等,覆盖了 Fortran 编程的各个方面。 #### 资源内容 1. **数学与科学计算库** - **线性代数库**:如 LAPACK 和 BLAS,这些库提供了矩阵运算、特征值分解和线性方程组求解等功能。 - **数值积分与微分**:包含常见的数值积分和微分方法的实现,如梯形法、辛普森法和龙格-库塔法。 - **随机数生成器**:用于蒙特卡洛模拟和随机过程仿真的高质量随机数生成器。 2. **文件操作与数据处理工具** - **文件读取与写入**:示例代码展示了如何高效地读取和写入各种格式的文件,包括 CSV、NetCDF 和 HDF5。 - **数据转换**:工具集帮助将数据从一种格式转换为另一种格式,以便
资源推荐
资源详情
资源评论
收起资源包目录
Fortran 程序的各种实用程序.zip (128个子文件)
AUTHORS 123B
UserOverride.cmake 1KB
array3.dat 800B
array4.dat 768B
array2.dat 27B
array1.dat 16B
zunhj.f 35KB
zunk2.f 17KB
zbknu.f 17KB
zairy.f 15KB
zbesh.f 14KB
zbiry.f 14KB
zunk1.f 14KB
zbesk.f 12KB
zbesi.f 12KB
zbesj.f 11KB
zbesy.f 10KB
zunik.f 9KB
zuni2.f 9KB
dgamln.f 8KB
zuoik.f 6KB
zuni1.f 6KB
zmlri.f 6KB
zacon.f 6KB
zseri.f 6KB
zbuni.f 5KB
zasyi.f 5KB
zbinu.f 4KB
zrati.f 4KB
zacai.f 4KB
zwrsk.f 3KB
zkscl.f 3KB
zs1s2.f 2KB
zbunk.f 1KB
dsclmr.f 1KB
zsqrt.f 1KB
zlog.f 1KB
zuchk.f 950B
fdump.f 947B
zabs.f 873B
zshch.f 549B
zdiv.f 492B
zexp.f 405B
zmlt.f 385B
linalg.f90 39KB
special.f90 29KB
lapack.f90 14KB
splines.f90 13KB
utils.f90 8KB
sorting.f90 6KB
mesh.f90 4KB
i1mach.f90 4KB
amos.f90 4KB
test_splines.f90 3KB
h5_utils.f90 3KB
test_eigh.f90 3KB
test_hankel1.f90 3KB
test_bessely.f90 3KB
d1mach.f90 3KB
r1mach.f90 3KB
test_hankel2.f90 2KB
test_bessel_zeros.f90 2KB
test_besselj.f90 2KB
ppm.f90 2KB
test_besselk.f90 2KB
test_besseli.f90 2KB
optimize.f90 2KB
test_inv.f90 1KB
test_eig.f90 1KB
test_lstsq.f90 1KB
test_sort.f90 1KB
test_eigh_bigger.f90 1KB
test_mesh.f90 1KB
test_airybi.f90 1012B
test_spherical_bessel_yn.f90 980B
test_argsort.f90 959B
test_secant.f90 937B
test_bisect.f90 934B
test_ppm.f90 933B
test_svdvals.f90 899B
test_dairybi.f90 862B
test_dairyai.f90 839B
test_airyai.f90 834B
test_svd.f90 766B
test_str.f90 681B
convolution.f90 646B
test_solve.f90 640B
types.f90 599B
test_cholesky.f90 591B
test_eigvals.f90 576B
test_diag.f90 550B
test_savetxt.f90 531B
test_h5_utils.f90 524B
test_loadtxt.f90 524B
constants.f90 502B
test_assert_pass.f90 494B
test_det.f90 477B
test_trace.f90 441B
test_constants.f90 192B
test_assert_fail2.f90 166B
共 128 条
- 1
- 2
资源评论
编程大全
- 粉丝: 624
- 资源: 98
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功