如何让 autotools 与英特尔编译器一起编译? [英] How do I get autotools to compile with the Intel compiler?

查看:40
本文介绍了如何让 autotools 与英特尔编译器一起编译?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望我的代码根据配置参数使用英特尔编译器或 gcc/g++ 进行编译.这可能吗?我需要在我的 configure.ac 和 Makefile.am 文件中放入什么才能实现这一点?

解决方案

如果你想在编译时使用 gcc 以外的编译器,请将 'CC=/path/to/compiler' 作为参数传递给 configure.(也就是说,运行 ./configure CC=/path.不要使用形式 CC=/path ./configure.)如果你希望默认编译器不是 gcc,你可以把

<前>CC=${CC-/path/to/default/compiler}

在调用 AC_PROG_CC 之前的 configure.ac 中.

I want my code to compile with the Intel compiler(s) or with gcc/g++ depending on a configure argument. Is this possible? What do I need to put in my configure.ac and Makefile.am files to make this happen?

解决方案

If you want to use a compiler other than gcc when you compile, pass 'CC=/path/to/compiler' as an argument to configure. (That is, run ./configure CC=/path. Do not use the form CC=/path ./configure.) If you want the default compiler to be something other than gcc, you can put

CC=${CC-/path/to/default/compiler}

in configure.ac before the invocation of AC_PROG_CC.

这篇关于如何让 autotools 与英特尔编译器一起编译?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆