Skip to content

Commit

Permalink
[SCons] Enable optimized icx compilation
Browse files Browse the repository at this point in the history
Co-authored-by: @tpg2114

Optimized compilation works if options include '-fp-model strict'.
  • Loading branch information
ischoegl committed Dec 7, 2021
1 parent 740337f commit 80b7663
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -435,11 +435,16 @@ config_options = [
"""Enable extra compiler optimizations specified by the
'optimize_flags' variable, instead of the flags specified by the
'no_optimize_flags' variable.""",
{"icx": False, "default": True}),
True),
Option(
"optimize_flags",
"Additional compiler flags passed to the C/C++ compiler when 'optimize=yes'.",
{"cl": "/O2", "gcc": "-O3 -Wno-inline", "default": "-O3"}),
{
"cl": "/O2",
"icx": "-O3 -fp-model strict",
"gcc": "-O3 -Wno-inline",
"default": "-O3",
}),
Option(
"no_optimize_flags",
"Additional compiler flags passed to the C/C++ compiler when 'optimize=no'.",
Expand Down Expand Up @@ -471,7 +476,6 @@ config_options = [
of Cantera (for example, excluding code in the 'ext' directory).""",
{
"cl": "/W3",
"icx": "-Wall -Wno-tautological-constant-compare",
"default": "-Wall",
}),
Option(
Expand Down

0 comments on commit 80b7663

Please sign in to comment.