Skip to content
Snippets Groups Projects
Commit 6dd2cc80 authored by Mark OLESEN's avatar Mark OLESEN
Browse files

CONFIG: provisional cuda rule. Update naming for CGAL rules

parent 9fd514bb
Branches
Tags
No related merge requests found
Showing
with 105 additions and 78 deletions
......@@ -4,7 +4,7 @@ EXE_NDEBUG = -DNDEBUG
CGAL_EXACT = /*-DCGAL_DONT_USE_LAZY_KERNEL*/
CGAL_INEXACT = -DCGAL_INEXACT
include $(GENERAL_RULES)/CGAL
include $(GENERAL_RULES)/cgal
EXE_INC = \
${ROUNDING_MATH} \
......
......@@ -4,7 +4,7 @@ EXE_NDEBUG = -DNDEBUG
CGAL_EXACT = /*-DCGAL_DONT_USE_LAZY_KERNEL*/
CGAL_INEXACT = -DCGAL_INEXACT
include $(GENERAL_RULES)/CGAL
include $(GENERAL_RULES)/cgal
EXE_INC = \
${ROUNDING_MATH} \
......
......@@ -4,7 +4,7 @@ EXE_NDEBUG = -DNDEBUG
CGAL_EXACT = /*-DCGAL_DONT_USE_LAZY_KERNEL*/
CGAL_INEXACT = -DCGAL_INEXACT
include $(GENERAL_RULES)/CGAL
include $(GENERAL_RULES)/cgal
EXE_INC = \
${ROUNDING_MATH} \
......
EXE_DEBUG = -DFULLDEBUG -g -O0
EXE_NDEBUG = -DNDEBUG
include $(GENERAL_RULES)/CGAL
include $(GENERAL_RULES)/cgal
EXE_INC = \
${ROUNDING_MATH} \
......
MarchingCubes = fastdualoctree_sgp
include $(GENERAL_RULES)/CGAL
include $(GENERAL_RULES)/cgal
EXE_INC = \
-DUNIX \
......
EXE_DEBUG = -DFULLDEBUG -g -O0
EXE_NDEBUG = -DNDEBUG
include $(GENERAL_RULES)/CGAL
include $(GENERAL_RULES)/cgal
EXE_INC = \
${ROUNDING_MATH} \
......
......@@ -7,7 +7,7 @@ c++CGALWARN = -Wno-old-style-cast
/*-- Define CGAL_INEXACT to use inexact CGAL constructions */
ifeq (,$(findstring NO_CGAL,$(COMP_FLAGS)))
include $(GENERAL_RULES)/CGAL
include $(GENERAL_RULES)/cgal
endif
EXE_INC = \
......
......@@ -5,7 +5,7 @@ c++CGALWARN = -Wno-old-style-cast
/*-- Define CGAL_INEXACT to use inexact CGAL constructions */
include $(GENERAL_RULES)/CGAL
include $(GENERAL_RULES)/cgal
EXE_INC = \
${ROUNDING_MATH} \
......
# ----------------------------------------------------------------------------
# CGAL definitions - several possibilities
#
# 0. missing
# 1. header-only
# 2. library, no mpfr
# 3. library, with mpfr (a likely default)
#
# Dispatch according to the defined 'CGAL_FLAVOUR'
# - names may change [see wmake/scripts/have_cgal]
# (no-cgal | cgal-header | cgal-no-mpfr | cgal-mpfr)
cgal_subrule := cgal-mpfr
ifneq (,$(findstring header,$(CGAL_FLAVOUR)))
cgal_subrule := cgal-header-only
endif
ifneq (,$(findstring no-mpfr,$(CGAL_FLAVOUR)))
cgal_subrule := cgal-no-mpfr
endif
# ----------------------------------------------------------------------------
# BOOST include/library directories - synthesize from ARCH_PATH as required
ifeq (,$(strip $(BOOST_INC_DIR)))
ifneq (,$(strip $(BOOST_ARCH_PATH)))
BOOST_INC_DIR = $(BOOST_ARCH_PATH)/include
BOOST_LIB_DIR = $(BOOST_ARCH_PATH)/lib \
$(BOOST_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH)
endif
endif
# ----------------------------------------------------------------------------
# CGAL include/library directories - synthesize from ARCH_PATH as required
ifeq (,$(strip $(CGAL_INC_DIR)))
ifneq (,$(strip $(CGAL_ARCH_PATH)))
CGAL_INC_DIR = $(CGAL_ARCH_PATH)/include
CGAL_LIB_DIR = $(CGAL_ARCH_PATH)/lib \
$(CGAL_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH)
endif
endif
# ----------------------------------------------------------------------------
CGAL_INC =
CGAL_LIBS =
include $(GENERAL_RULES)/$(cgal_subrule)
# Override
sinclude $(DEFAULT_RULES)/CGAL
sinclude $(DEFAULT_RULES)/$(cgal_subrule)
# DEBUG
# -----
## $(info CGAL_FLAVOUR $(CGAL_FLAVOUR))
## $(info subrule $(cgal_subrule))
## CGAL_INC += -Wp,-v
## $(info CGAL_INC: $(CGAL_INC))
## $(info CGAL_LIB: $(CGAL_LIBS))
## $(info BOOST_INC_DIR: $(BOOST_INC_DIR))
## $(info BOOST_LIB_DIR: $(BOOST_LIB_DIR))
## $(info CGAL_INC_DIR: $(CGAL_INC_DIR))
## $(info CGAL_LIB_DIR: $(CGAL_LIB_DIR))
# ---------------------------------------------------------------------------
include $(GENERAL_RULES)/cgal
# ----------------------------------------------------------------------------
# CGAL definitions - several possibilities
#
# 0. missing
# 1. header-only
# 2. library, no mpfr
# 3. library, with mpfr (a likely default)
#
# Dispatch according to the defined 'CGAL_FLAVOUR'
# - names may change [see wmake/scripts/have_cgal]
# (no-cgal | cgal-header | cgal-no-mpfr | cgal-mpfr)
cgal_subrule := cgal-mpfr
ifneq (,$(findstring header,$(CGAL_FLAVOUR)))
cgal_subrule := cgal-header-only
endif
ifneq (,$(findstring no-mpfr,$(CGAL_FLAVOUR)))
cgal_subrule := cgal-no-mpfr
endif
# ----------------------------------------------------------------------------
# BOOST include/library directories - synthesize from ARCH_PATH as required
ifeq (,$(strip $(BOOST_INC_DIR)))
ifneq (,$(strip $(BOOST_ARCH_PATH)))
BOOST_INC_DIR = $(BOOST_ARCH_PATH)/include
BOOST_LIB_DIR = $(BOOST_ARCH_PATH)/lib \
$(BOOST_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH)
endif
endif
# ----------------------------------------------------------------------------
# CGAL include/library directories - synthesize from ARCH_PATH as required
ifeq (,$(strip $(CGAL_INC_DIR)))
ifneq (,$(strip $(CGAL_ARCH_PATH)))
CGAL_INC_DIR = $(CGAL_ARCH_PATH)/include
CGAL_LIB_DIR = $(CGAL_ARCH_PATH)/lib \
$(CGAL_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH)
endif
endif
# ----------------------------------------------------------------------------
CGAL_INC =
CGAL_LIBS =
include $(GENERAL_RULES)/$(cgal_subrule)
# Override
sinclude $(DEFAULT_RULES)/cgal
sinclude $(DEFAULT_RULES)/$(cgal_subrule)
# DEBUG
# -----
## $(info CGAL_FLAVOUR $(CGAL_FLAVOUR))
## $(info subrule $(cgal_subrule))
## CGAL_INC += -Wp,-v
## $(info CGAL_INC: $(CGAL_INC))
## $(info CGAL_LIB: $(CGAL_LIBS))
## $(info BOOST_INC_DIR: $(BOOST_INC_DIR))
## $(info BOOST_LIB_DIR: $(BOOST_LIB_DIR))
## $(info CGAL_INC_DIR: $(CGAL_INC_DIR))
## $(info CGAL_LIB_DIR: $(CGAL_LIB_DIR))
# ---------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Additional rules for handling CUDA files
SUFFIXES += .cu
ifeq (,$(NVARCH))
NVARCH = 70
endif
NVCC = nvcc -std=c++14 --compiler-options='-fPIC'
cuARCH = -arch=sm_$(NVARCH)
cuOPT = -O3
cuDBUG =
# Similar to c++FLAGS
cuFLAGS = $(GFLAGS) -DNoRepository $(cuARCH) $(cuOPT) $(cuDBUG) $(LIB_HEADER_DIRS)
cutoo = $(WM_SCHEDULER) $(NVCC) $(cuFLAGS) -c $< -o $@
$(OBJECTS_DIR)/%.o : %.cu
$(cutoo)
CUDA_LINKLIBSO = $(NVCC) -shared
#------------------------------------------------------------------------------
SUFFIXES += .qt
qttoo = $E $(call QUIET_MESSAGE,moc,$(<F)) \
$(WM_SCHEDULER) $(QTDIR)/bin/moc -f $< -o $(@D)/$(<F).C $(AND) \
$(WM_SCHEDULER) $(QTDIR)/bin/moc -f $< $< -o $(@D)/$(<F).C $(AND) \
$(CC) $(c++FLAGS) -c $(@D)/$(<F).C -o $@
File moved
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment