Code generation to C/C++ compiler option "fp:strict"

조회 수: 1 (최근 30일)
Mansoor Aman
Mansoor Aman 2020년 1월 29일
댓글: Mansoor Aman 2020년 1월 30일
When running codegen, the makefiles always have the "fp:strict" compiler option. Is there anyway to modify this option?
As a work-around, I can manually modify the makefile manually and re-run it.

답변 (1개)

Darshan Ramakant Bhat
Darshan Ramakant Bhat 2020년 1월 30일
I could not reproduce this in R2019b version of MATLAB (and I have not verified this is the case in the previous releases).
You can take a look at coder.updatebuildinfo function to modify the compiler flags.
You can try doing something like below if that is what you want :
coder.updateBuildInfo('addCompileFlags','/fp:fast');
You can also take a look at post-codegen-command :
Hope this will help you.
  댓글 수: 1
Mansoor Aman
Mansoor Aman 2020년 1월 30일
So the default *.mk file or build.ninja file in: "C:\Program Files\MATLAB\R2017b\toolbox\coder\coder\mex\c" include this flag and so it works its way into the generated makefile.
For example, Matlab 2017b "mex_msvc.mk" has this on line 18.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 MATLAB Coder에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by