Skip to content

Commit ed94076

Browse files
committed
fix: macos fixes
1 parent 0cee3a1 commit ed94076

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

cpp/Makefile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ all: tests check
99
include ../mk/common.mk
1010

1111
CXX = /usr/bin/g++
12+
13+
SYS_NAME:=$(shell uname -s)
14+
IS_CYGWIN:=$(findstring CYGWIN, $(SYS_NAME))
15+
IS_MACOS:=$(findstring Darwin, $(SYS_NAME))
16+
17+
ifeq ($(IS_MACOS), Darwin)
18+
CXX = /usr/local/bin/g++
19+
endif
20+
1221
MIN_GPP_VERSION=13
1322
GPP_VERSION:=$(shell $(CXX) -dumpfullversion | cut -d. -f1)
1423
CHECK_GPP_VERSION:=$(shell expr "$(GPP_VERSION)" ">=" "$(MIN_GPP_VERSION)")
@@ -20,9 +29,6 @@ endif
2029

2130
CXXFLAGS = -std=c++20 -Wall -Wextra -Wpedantic -Werror -Iincludes
2231

23-
SYS_NAME:=$(shell uname -s)
24-
IS_CYGWIN:=$(findstring CYGWIN, $(SYS_NAME))
25-
2632
ifeq ($(IS_CYGWIN), CYGWIN)
2733
CXXFLAGS += -static-libstdc++
2834
endif

0 commit comments

Comments
 (0)