mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
CONFIG: provisional cuda rule. Update naming for CGAL rules
This commit is contained in:
@ -1,69 +1 @@
|
||||
# ----------------------------------------------------------------------------
|
||||
# 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
|
||||
|
||||
69
wmake/rules/General/cgal
Normal file
69
wmake/rules/General/cgal
Normal file
@ -0,0 +1,69 @@
|
||||
# ----------------------------------------------------------------------------
|
||||
# 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))
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
26
wmake/rules/General/cuda
Normal file
26
wmake/rules/General/cuda
Normal file
@ -0,0 +1,26 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# 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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -1,5 +1,5 @@
|
||||
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 $@
|
||||
|
||||
Reference in New Issue
Block a user