1 Star 1 Fork 0

董理/fortran-string

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
CMakeLists.txt 1.13 KB
一键复制 编辑 原始数据 按行查看 历史
董理 提交于 2024-03-29 22:07 . Update CMake minimum version
cmake_minimum_required(VERSION 3.5)
project(fortran-string LANGUAGES Fortran)
if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ffree-line-length-none")
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g -Wall -Wextra -Warray-temporaries -Wconversion -fimplicit-none -fbacktrace -fcheck=all -ffpe-trap=zero,overflow,underflow -finit-real=nan")
else ()
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ffpe-summary=none -Ofast")
endif ()
endif ()
set (CMAKE_Fortran_MODULE_DIRECTORY "${CMAKE_BINARY_DIR}")
include_directories(${CMAKE_BINARY_DIR})
get_directory_property(parent_dir PARENT_DIRECTORY)
if (EXISTS ${PROJECT_SOURCE_DIR}/lib/unit-test/CMakeLists.txt AND NOT parent_dir)
set(HAS_UNIT_TEST ON)
add_subdirectory(lib/unit-test)
endif ()
set(sources
src/string_mod.F90
src/string_actions_mod.F90
src/string_numerics_mod.F90
src/string.F90
)
add_library(fortran_string ${sources})
if (HAS_UNIT_TEST)
add_executable(string_test.exe src/string_test.F90)
target_link_libraries(string_test.exe fortran_string fortran_unit_test)
endif ()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
FORTRAN
1
https://gitee.com/dongli85/fortran-string.git
[email protected]:dongli85/fortran-string.git
dongli85
fortran-string
fortran-string
master

搜索帮助