Skip to content

Commit 6837356

Browse files
committed
Add C++ include path directly to cxx_flags for scons checks
Issue: scons' configuration checks still couldn't find <cmath> even though we were passing extra_inc_dirs with the C++ header path. Root cause: Cantera's scons configuration checks don't use extra_inc_dirs during the check phase - that parameter is only used during the actual build. The checks use the cc_flags and cxx_flags directly. Solution: Add -I<SDK>/usr/include/c++/v1 directly to the cxx_flags parameter so it's included in scons' test compiles: cxx_flags="-isysroot<SDK> -stdlib=libc++ -I<SDK>/usr/include/c++/v1" This ensures the C++ header path is available during scons' "Checking for C++ header file cmath..." test.
1 parent acb0441 commit 6837356

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packaging/homebrew/mfc.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,13 @@ def install
5555

5656
# Run scons, explicitly passing compiler flags as Cantera scons variables
5757
# Cantera uses cc_flags/cxx_flags, not CCFLAGS/CXXFLAGS
58-
# This ensures they apply to scons' configuration test compiles
58+
# Include C++ header path directly in cxx_flags for scons' configuration checks
59+
cxx_flags_with_includes = "#{ENV.fetch("CXXFLAGS", nil)} -I#{cxx_inc_path}"
5960
system venv/"bin/python", "-m", "SCons", "build",
6061
"CC=#{ENV.cc}",
6162
"CXX=#{ENV.cxx}",
6263
"cc_flags=#{ENV.fetch("CFLAGS", nil)}",
63-
"cxx_flags=#{ENV.fetch("CXXFLAGS", nil)}",
64+
"cxx_flags=#{cxx_flags_with_includes}",
6465
"python_package=y",
6566
"f90_interface=n",
6667
"system_sundials=y",

0 commit comments

Comments
 (0)