Skip to content
Snippets Groups Projects
Commit a17cae54 authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

MNT: Set default C++ standard to C++11. Do not set glibc ABI compatibility -

allow this to be set in the environment
parent de68f2e1
No related branches found
No related tags found
1 merge request!4Clean up construction of compiler flags
......@@ -34,10 +34,10 @@ TCLSH ?= ${FSLDIR}/bin/fsltclsh
# constructed in common/vars.mk
# Compiler flags for C projects
ARCHCFLAGS =
ARCHCFLAGS = -std=c99
# Compiler flags for C++ projects.
ARCHCXXFLAGS = -D_GLIBCXX_USE_CXX11_ABI=0
ARCHCXXFLAGS = -std=c++11
# Linker flags for all projects
ARCHLDFLAGS =
......@@ -61,10 +61,11 @@ ifeq ($(SYSTYPE), Darwin)
# Commands
CC ?= cc
CXX ?= c++
LD ?= ld
# Compiler flags
ARCHCXXFLAGS += -arch x86_64 -Wall -pedantic -fPIC
ARCHCFLAGS += $(ARCHCXXFLAGS) -std=c99
ARCHCFLAGS += -arch x86_64 -Wall -pedantic -fPIC
ARCHLDFLAGS += -Wl,-search_paths_first
ARCHLIBS += -llapack -lblas -lz -lm
endif
......@@ -76,14 +77,16 @@ endif
#####################################################################
ifeq ($(SYSTYPE), Linux)
# Commands
# Commands
CC ?= gcc
CXX ?= c++
LD ?= ld
# Compiler flags
ARCHCFLAGS += -fexpensive-optimizations \
-Wall -pedantic -Wno-long-long -fPIC
ARCHCXXFLAGS += $(ARCHCFLAGS)
ARCHCXXFLAGS += -fexpensive-optimizations \
-Wall -pedantic -Wno-long-long -fPIC
ARCHLDFLAGS += -Wl,-rpath,'$$ORIGIN/../lib'
ARCHLIBS += -lopenblas -lz -lm
endif # if Linux
......
#########################################################
# Variables used for FSL project compilation/installation
#
# Default compiler/platform specific variables are
# initialised in buildSettings.mk, which is included
# before this file. Project specific variables are
# initialised in the project Makefile.
#########################################################
# All projects must specify a name
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment