Commit 6bec64f4 authored by Charles G Waldman's avatar Charles G Waldman
Browse files

accept TRUE, ON, or YES for ENABLE_CGAL

parent 69815f50
Loading
Loading
Loading
Loading
Loading
+5 −3
Changes for GNUmakefile: 5 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -10,14 +10,16 @@ TARGET ?= libcsg-eb.a
BUILD_DIR ?= ./build
CONFIG_FILE ?= CsgEbConfig.mk

# Accept CMake (ON) and AMReX (TRUE) spellings; FALSE/OFF/0/empty disable.
CGAL_ON := $(filter TRUE ON YES 1,$(ENABLE_CGAL))

SRCFILENAMES := csg.cpp \
	levelset_2d.cpp \
	levelset_3d.cpp \
	matrix_functions.cpp \
	parser.cpp \
	exception.cpp \
	$(if $(ENABLE_CGAL),cgal_helper_polygon.cpp,) \
	$(if $(ENABLE_CGAL),cgal_helper_polyhedron.cpp,)
	$(if $(CGAL_ON),cgal_helper_polygon.cpp cgal_helper_polyhedron.cpp,)

SRCS := $(SRCFILENAMES:%=./src/csg/%)
OBJS := $(SRCS:%=$(BUILD_DIR)/%.o)
@@ -33,7 +35,7 @@ INC_FLAGS := $(addprefix -I,$(INC_DIRS))

CPPFLAGS ?= $(INC_FLAGS) -MMD -MP

ifeq ($(ENABLE_CGAL),TRUE)
ifneq ($(CGAL_ON),)
CPPFLAGS += -DUSE_CGAL
endif