File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,10 @@ class OpenMpi < Formula
37
37
38
38
def install
39
39
ENV . runtime_cpu_detection
40
+ # Force use of Homebrew's default GCC
41
+ gcc = Formula [ "gcc" ]
42
+ ENV [ "CC" ] = gcc . opt_bin /"gcc-#{ gcc . version . major } "
43
+ ENV [ "CXX" ] = gcc . opt_bin /"g++-#{ gcc . version . major } "
40
44
41
45
# Otherwise libmpi_usempi_ignore_tkr gets built as a static library
42
46
ENV [ "MACOSX_DEPLOYMENT_TARGET" ] = MacOS . version if OS . mac?
@@ -50,8 +54,8 @@ def install
50
54
ompi/tools/ompi_info/param.c
51
55
oshmem/tools/oshmem_info/param.c
52
56
]
53
- cxx = OS . linux? ? "g++" : ENV . cxx
54
- cc = OS . linux? ? "gcc" : ENV . cc
57
+ cxx = ENV . cxx
58
+ cc = ENV . cc
55
59
inreplace inreplace_files , "OMPI_CXX_ABSOLUTE" , "\" #{ cxx } \" "
56
60
inreplace inreplace_files , "OPAL_CC_ABSOLUTE" , "\" #{ cc } \" "
57
61
inreplace "3rd-party/prrte/src/tools/prte_info/param.c" , "PRTE_CC_ABSOLUTE" , "\" #{ cc } \" "
@@ -74,6 +78,7 @@ def install
74
78
75
79
system "./configure" , *args , *std_configure_args
76
80
system "make" , "all"
81
+
77
82
system "make" , "check"
78
83
system "make" , "install"
79
84
You can’t perform that action at this time.
0 commit comments