From 8d0e3b1a4a3185b7f1879b4c8ca58715b05b8822 Mon Sep 17 00:00:00 2001 From: Li Jin Date: Wed, 25 Mar 2020 00:45:37 +0800 Subject: fix CI build. --- makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'makefile') diff --git a/makefile b/makefile index a285842..d176ee3 100644 --- a/makefile +++ b/makefile @@ -1,8 +1,7 @@ #### PROJECT SETTINGS #### # The name of the executable to be created BIN_NAME := moonp -# Compiler used -CXX ?= g++ + # Extension of source files used in the project SRC_EXT = cpp # Path to the source directory, relative to the makefile @@ -41,6 +40,14 @@ TEST_OUTPUT = ./spec/outputs # Obtains the OS type, either 'Darwin' (OS X) or 'Linux' UNAME_S:=$(shell uname -s) +# Select compiler, add platform related linker flag +ifeq ($(UNAME_S),Darwin) + CXX ?= clang +else + LINK_FLAGS += -lstdc++fs + CXX ?= g++-8 +endif + # Function used to check variables. Use on the command line: # make print-VARNAME # Useful for debugging and adding features -- cgit v1.2.3-55-g6feb