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"
相关推荐
迹象Kimizhou_blog3 小时前
国内 IntelliJ IDEA 集成Claude code,调用deepSeek模型实现agent
java·ide·intellij-idea·deepseek·claude code
bestlanzi3 小时前
vscode 常用的配置内容
ide·vscode·编辑器
乐活青年4 小时前
新版Android Studio不显示gradle task list 问题
android·ide·android studio
公孙秋6 小时前
IDEA MyBatisCodeHelper Pro插件高版本解密
java·ide·intellij-idea
jinglong.zha6 小时前
别再只用命令行!Claude Code接入VSCode和PyCharm,这些技巧让你爽到飞起!
ide·vscode·pycharm·claude code
AI@独行侠6 小时前
【超详细】IDEA 2025版-常用设置配置-一篇文章带您解决idea 2025版本常用配置
java·ide·intellij-idea
码农小旋风10 小时前
IDEA 不只接 Claude 和 Codex:本地模型和第三方 API 也能直接用
java·ide·人工智能·chatgpt·intellij-idea·claude
徐先生 @_@|||10 小时前
pycharm/IDEA + markdown + 图床(PicList)
ide·python·pycharm·intellij-idea
janeysj10 小时前
Jupyter和LangSmith——AI Agent开发调试监控工具
ide·人工智能·jupyter
之歆11 小时前
Claude Code 多账号体系实战:终端别名、脚本与 IDEA CC GUI 切换指南
java·ide·intellij-idea