Skip to content

Commit

Permalink
move enable truthiness to check_deps
Browse files Browse the repository at this point in the history
  • Loading branch information
aprilnovak committed Jun 6, 2024
1 parent 21e0a66 commit 12b4158
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 21 deletions.
23 changes: 2 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,34 +105,15 @@ endif
HDF5_INCLUDE_DIR ?= $(HDF5_ROOT)/include
HDF5_LIBDIR ?= $(HDF5_ROOT)/lib

# convert ENABLE_NEK, ENABLE_OPENMC, and ENABLE_DAGMC to consistent truthy value
ifeq ($(ENABLE_OPENMC),$(filter $(ENABLE_OPENMC), true yes on 1 TRUE YES ON))
ENABLE_OPENMC := yes
endif
ifeq ($(ENABLE_NEK),$(filter $(ENABLE_NEK), true yes on 1 TRUE YES ON))
ENABLE_NEK := yes
endif
ifeq ($(ENABLE_DAGMC),$(filter $(ENABLE_DAGMC), true yes on 1 TRUE YES ON))
ENABLE_DAGMC := yes
endif

ifeq ($(ENABLE_OPENMC), yes)
# HDF5 is only needed to be linked if using OpenMC
$(info Cardinal is using HDF5 from $(HDF5_ROOT))
else
ifeq ($(ENABLE_DAGMC), yes)
$(info Ignoring ENABLE_DAGMC because OpenMC is not enabled.)
ENABLE_DAGMC := no
endif
endif

# Check that NEKRS_HOME is set to the correct location
ifeq ($(ENABLE_NEK), yes)
include config/check_nekrs.mk
endif

ALL_MODULES := no

# you may opt to enable additional modules by listing them here; any modules required
# by third-party dependencies will be re-enabled if necessary
FLUID_PROPERTIES := yes
HEAT_TRANSFER := yes
NAVIER_STOKES := yes
Expand Down
21 changes: 21 additions & 0 deletions config/check_deps.mk
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,27 @@ ifeq ($(ENABLE_OPENMC), yes)
$(info Cardinal is using HDF5 from $(HDF5_ROOT))
endif

# convert ENABLE_NEK, ENABLE_OPENMC, and ENABLE_DAGMC to consistent truthy value
ifeq ($(ENABLE_OPENMC),$(filter $(ENABLE_OPENMC), true yes on 1 TRUE YES ON))
ENABLE_OPENMC := yes
endif
ifeq ($(ENABLE_NEK),$(filter $(ENABLE_NEK), true yes on 1 TRUE YES ON))
ENABLE_NEK := yes
endif
ifeq ($(ENABLE_DAGMC),$(filter $(ENABLE_DAGMC), true yes on 1 TRUE YES ON))
ENABLE_DAGMC := yes
endif

ifeq ($(ENABLE_OPENMC), yes)
else
ifeq ($(ENABLE_DAGMC), yes)
$(info Ignoring ENABLE_DAGMC because OpenMC is not enabled.)
ENABLE_DAGMC := no
endif
endif



ifeq ($(MOOSE_CONTENT),)
$(error $n"MOOSE framework does not seem to be available. Make sure that either the submodule is checked out$nor that MOOSE_DIR points to a location with the MOOSE source.$n$nTo fetch the MOOSE submodule, use ./scripts/get-dependencies.sh")
else
Expand Down

0 comments on commit 12b4158

Please sign in to comment.