forked from idaholab/blackbear
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add NEML as a submodule Add Makefile to build NEML using the MOOSE build system Fix issues with NEML tests and make them run only if NEML is compiled in
- Loading branch information
Showing
9 changed files
with
58 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "contrib/neml"] | ||
path = contrib/neml | ||
url = ../../Argonne-National-Laboratory/neml.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include $(BLACKBEAR_DIR)/contrib/neml.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
ifeq ($(shell pkg-config libxml++-2.6 && echo go),go) | ||
|
||
neml_DIR := $(BLACKBEAR_DIR)/contrib/neml | ||
|
||
ifneq ($(wildcard $(neml_DIR)/CMakeLists.txt),) | ||
|
||
#Exclude all the files with _wrap in the name because they are drivers for testing | ||
#that are not needed and have additional dependencies. | ||
neml_srcfiles := $(shell find $(neml_DIR)/src -name "*.cxx" | grep -v _wrap) | ||
neml_objects += $(patsubst %.cxx,%.$(obj-suffix),$(neml_srcfiles)) | ||
neml_LIB := $(neml_DIR)/libneml-$(METHOD).la | ||
neml_deps := $(patsubst %.cxx,%.$(obj-suffix).d,$(neml_srcfiles)) | ||
neml_includes := $(neml_DIR)/src | ||
|
||
$(APPLICATION_DIR)/lib/libblackbear-$(METHOD).la: $(neml_LIB) | ||
|
||
$(neml_LIB): $(neml_objects) | ||
@echo "Linking Library "$@"..." | ||
@$(libmesh_LIBTOOL) --tag=CC $(LIBTOOLFLAGS) --mode=link --quiet \ | ||
$(libmesh_CC) $(libmesh_CFLAGS) -o $@ $(neml_objects) $(libmesh_LIBS) $(libmesh_LDFLAGS) $(EXTERNAL_FLAGS) -rpath $(neml_DIR) | ||
@$(libmesh_LIBTOOL) --mode=install --quiet install -c $(neml_LIB) $(neml_DIR) | ||
|
||
%.$(obj-suffix) : %.cxx | ||
@echo "Compiling C++ (in "$(METHOD)" mode) "$<"..." | ||
@$(libmesh_LIBTOOL) --tag=CXX $(LIBTOOLFLAGS) --mode=compile --quiet \ | ||
$(libmesh_CXX) $(libmesh_CPPFLAGS) $(ADDITIONAL_CPPFLAGS) $(libmesh_CXXFLAGS) $(app_INCLUDES) $(libmesh_INCLUDE) -w -DHAVE_CONFIG_H -MMD -MP -MF $@.d -MT $@ -c $< -o $@ | ||
|
||
ADDITIONAL_INCLUDES += $(shell pkg-config libxml++-2.6 --cflags) | ||
ADDITIONAL_LIBS += $(shell pkg-config libxml++-2.6 --libs) | ||
ADDITIONAL_INCLUDES += -I$(neml_includes) | ||
ADDITIONAL_LIBS += -L$(neml_DIR) -lneml-$(METHOD) | ||
ADDITIONAL_CPPFLAGS += -DNEML_ENABLED | ||
|
||
else | ||
$(info WARNING: Not building with NEML because contrib/neml submodule is not present) | ||
$(info See https://github.com/Argonne-National-Laboratory/neml/blob/dev/INSTALL.md) | ||
endif | ||
|
||
else | ||
$(info WARNING: Not building with NEML because libxml++ was not found.) | ||
$(info See https://github.com/Argonne-National-Laboratory/neml/blob/dev/INSTALL.md) | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters