Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Apollo/MOOSE Linking Issues #90

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ CONTACT := no
EXTERNAL_PETSC_SOLVER := no
FLUID_PROPERTIES := no
FUNCTIONAL_EXPANSION_TOOLS := no
HEAT_CONDUCTION := yes
HEAT_TRANSFER := yes
LEVEL_SET := no
MISC := no
NAVIER_STOKES := no
Expand Down
6 changes: 0 additions & 6 deletions apollo.mk
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
#
# Check the existence of the contrib submodules and build accordingly
#
MFEM_DIR?=$(APPLICATION_DIR)/../mfem/build
include $(MFEM_DIR)/config/config.mk


HEPHAESTUS_DIR?=$(APPLICATION_DIR)/contrib/hephaestus
ADDITIONAL_CPPFLAGS += -DHEPHAESTUS_ENABLED
include $(APPLICATION_DIR)/contrib/hephaestus.mk
36 changes: 24 additions & 12 deletions contrib/hephaestus.mk
Original file line number Diff line number Diff line change
@@ -1,17 +1,29 @@
############################### HEPHAESTUS #######################################h
###############################################################################
# source files
############################### HEPHAESTUS ######################################
#################################################################################
MFEM_DIR :=$(APPLICATION_DIR)/../mfem/build

MFEM_INC= -I$(MFEM_DIR) -I$(MFEM_SOURCE_DIR) -I$(MFEM_SOURCE_DIR)/miniapps/common
MFEM_LIB= -L$(MFEM_DIR) -lmfem -lrt -L$(MFEM_DIR)/miniapps/common -lmfem-common
include $(MFEM_DIR)/config/config.mk

HEPHAESTUS_INCDIR = $(sort $(dir $(shell find $(HEPHAESTUS_DIR)/src/ -name "*.hpp")))
HEPHAESTUS_INC=$(foreach d, $(HEPHAESTUS_INCDIR), -I$d)
HEPHAESTUS_LIBDIR = $(HEPHAESTUS_DIR)/lib
HEPHAESTUS_LIB = -Wl,-rpath,$(HEPHAESTUS_LIBDIR) -L$(HEPHAESTUS_LIBDIR) -lhephaestus -lnetcdf
MFEM_INCLUDE := -I$(MFEM_DIR) -I$(MFEM_SOURCE_DIR) -I$(MFEM_SOURCE_DIR)/miniapps/common
MFEM_LIB := -L$(MFEM_DIR) -lmfem -lrt -L$(MFEM_DIR)/miniapps/common -lmfem-common

ADDITIONAL_INCLUDES += $(HEPHAESTUS_INC) $(MFEM_INC) -I$(MFEM_INC_DIR)/config
ADDITIONAL_LIBS += $(HEPHAESTUS_LIB) $(MFEM_LIB)
HEPHAESTUS_DIR := $(APPLICATION_DIR)/contrib/hephaestus

HEPHAESTUS_LIB_DIR := $(HEPHAESTUS_DIR)/lib
HEPHAESTUS_LIB := $(HEPHAESTUS_LIB_DIR)/libhephaestus.so

HEPHAESTUS_INCLUDE_LIB := $(sort $(dir $(shell find $(HEPHAESTUS_DIR)/src/ -name "*.hpp")))
HEPHAESTUS_INCLUDE := $(foreach d, $(HEPHAESTUS_INCLUDE_LIB), -I$d)

HEPHAESTUS_CXX_FLAGS := -Wall $(HEPHAESTUS_INCLUDE) $(MFEM_INCLUDE) -I$(MFEM_INC_DIR)/config
HEPHAESTUS_LDFLAGS := -Wl,-rpath,$(HEPHAESTUS_LIB_DIR) -L$(HEPHAESTUS_LIB_DIR) -lhephaestus -lnetcdf $(MFEM_LIB)

libmesh_CXXFlags += $(HEPHAESTUS_CXX_FLAGS)
libmesh_LDFLAGS += $(HEPHAESTUS_LDFLAGS)

ADDITIONAL_CPPFLAGS += -DHEPHAESTUS_ENABLED
ADDITIONAL_INCLUDES += $(HEPHAESTUS_CXX_FLAGS)
ADDITIONAL_LIBS += $(HEPHAESTUS_LDFLAGS)

$(info ADDITIONAL_INCLUDES = $(ADDITIONAL_INCLUDES));
$(info ADDITIONAL_LIBS = $(ADDITIONAL_LIBS));
$(info ADDITIONAL_LIBS = $(ADDITIONAL_LIBS));
Loading