Skip to content

Commit

Permalink
Merge pull request #90 from aurora-multiphysics/EdwardPalmer99/Fix-MO…
Browse files Browse the repository at this point in the history
…OSE-Linking-Issues-V2

Fix Apollo/MOOSE Linking Issues
  • Loading branch information
alexanderianblair authored Feb 1, 2024
2 parents 54ce036 + 0869ca7 commit bb40acb
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 19 deletions.
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));

0 comments on commit bb40acb

Please sign in to comment.