File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # Use C++11
2- CXXFLAGS += -std=c++11
1+ # Use C++11, dont warn on long-to-float conversion
2+ CXXFLAGS += -std=c++11 -Wno-conversion
33
44# Default to using system's default version of python
55PYTHON_BIN ?= python
66PYTHON_CONFIG := $(PYTHON_BIN ) -config
77PYTHON_INCLUDE ?= $(shell $(PYTHON_CONFIG ) --includes)
8- CXXFLAGS + = $(PYTHON_INCLUDE )
8+ EXTRA_FLAGS : = $(PYTHON_INCLUDE )
99LDFLAGS += $(shell $(PYTHON_CONFIG ) --libs)
1010
1111# Either finds numpy or set -DWITHOUT_NUMPY
12- CXXFLAGS += $(shell $(PYTHON_BIN ) $(CURDIR ) /numpy_flags.py)
12+ EXTRA_FLAGS += $(shell $(PYTHON_BIN ) $(CURDIR ) /numpy_flags.py)
1313WITHOUT_NUMPY := $(findstring $(CXXFLAGS ) , WITHOUT_NUMPY)
1414
1515# Examples requiring numpy support to compile
@@ -28,7 +28,7 @@ examples: $(EXAMPLE_TARGETS)
2828# Assume every *.cpp file is a separate example
2929$(EXAMPLE_TARGETS ) : examples/build/% : examples/% .cpp
3030 mkdir -p examples/build
31- $(CXX ) -o $@ $< $(CXXFLAGS ) $(LDFLAGS )
31+ $(CXX ) -o $@ $< $(EXTRA_FLAGS ) $( CXXFLAGS ) $(LDFLAGS )
3232
3333clean :
3434 rm -f ${EXAMPLE_TARGETS}
You can’t perform that action at this time.
0 commit comments