Skip to content

Commit

Permalink
disable boost by default
Browse files Browse the repository at this point in the history
  • Loading branch information
ihh committed Oct 31, 2019
1 parent eecc5c2 commit 558bcb5
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

.SECONDARY:

# Pseudotargets that control compilation
USING_BOOST = $(findstring boost,$(MAKECMDGOALS))
IS_DEBUG = $(findstring debug,$(MAKECMDGOALS))

# try to figure out where GSL is
# autoconf would be better but we just need a quick hack for now :)
# Thanks to Torsten Seemann for gsl-config and pkg-config formulae
Expand All @@ -26,6 +30,11 @@ endif
# figure out whether to use Boost
# Boost is needed for regexes with some versions of gcc.
# NB pkg-config support for Boost is lacking; see https://svn.boost.org/trac/boost/ticket/1094
ifeq (,$(USING_BOOST))
BOOSTPREFIX =
BOOSTFLAGS =
BOOSTLIBS =
else
BOOSTPREFIX = /usr
ifeq (,$(wildcard $(BOOSTPREFIX)/include/boost/regex.h))
BOOSTPREFIX = /usr/local
Expand All @@ -40,12 +49,13 @@ ifneq (,$(BOOSTPREFIX))
BOOSTFLAGS := -DUSE_BOOST -I$(BOOSTPREFIX)/include
BOOSTLIBS := -L$(BOOSTPREFIX)/lib -lboost_regex
endif
endif

# install dir
PREFIX = /usr/local

# other flags
ifneq (,$(findstring debug,$(MAKECMDGOALS)))
ifneq (,$(IS_DEBUG))
CPPFLAGS = -std=c++11 -g -DUSE_VECTOR_GUARDS $(GSLFLAGS) $(BOOSTFLAGS)
else
CPPFLAGS = -std=c++11 -g -O3 $(GSLFLAGS) $(BOOSTFLAGS)
Expand Down

0 comments on commit 558bcb5

Please sign in to comment.