visual studio编译fortran

1、下载hpc-toolkithttps://www.intel.com/content/www/us/en/developer/tools/oneapi/hpc-toolkit-download.html

2、配置环境变量

检查ifx是否在环境变量中

3、

复制代码
# FORTRAN code
enable_language(Fortran)

if(${CMAKE_Fortran_COMPILER} MATCHES "ifort.*")
    set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS} -fltconsistency")
    set(CMAKE_Fortran_FLAGS_DEBUG   "${CMAKE_Fortran_FLAGS} -fltconsistency")
endif()

set(SRC
    *.f
    
)

add_library(xxx STATIC 
            ${SRC}
)

4、build

复制代码
cmake -S . -B build -G "Visual Studio 16 2019" -T "fortran=ifx"
相关推荐
追逐时光者2 天前
精选 5 款基于 .NET 开源的 Visual Studio 实用插件
visual studio
Diligently_5 天前
idea 中vm option 配置
java·ide·intellij-idea
我命由我123455 天前
在 Android Studio 中,新建 AIDL 文件按钮是灰色
android·ide·android studio·安卓·android jetpack·android-studio·android runtime
AC赳赳老秦5 天前
云原生AI故障排查新趋势:利用DeepSeek实现高效定位部署报错与性能瓶颈
ide·人工智能·python·云原生·prometheus·ai-native·deepseek
被制作时长两年半的个人练习生5 天前
claude code for vscode 配置 qwen3.5
ide·vscode·claude code·qwen3.5
圣心5 天前
Visual Studio Code 中的 AI 智能操作
ide·人工智能·vscode
吹牛不交税5 天前
关于vscode左侧资源管理器目录层级疑似异常的问题
ide·vscode·编辑器
xixi09245 天前
selenium IDE安装使用教程
ide·selenium·测试工具
西门吹-禅5 天前
【eclipse 升级】
java·ide·eclipse
无限进步_5 天前
138. 随机链表的复制 - 题解与详细分析
c语言·开发语言·数据结构·算法·链表·github·visual studio