Skip to content

Commit

Permalink
Merge pull request #28609 from GiudGiud/PR_fp_followup
Browse files Browse the repository at this point in the history
Makefile fix for external FP submodule inclusion
  • Loading branch information
GiudGiud authored Sep 27, 2024
2 parents 8a0fd55 + cff8a9c commit c889ff8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion framework/app.mk
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ app_EXEC := $(APPLICATION_DIR)/$(APPLICATION_NAME)-$(METHOD)
ifeq ($(GEN_REVISION),yes)
CAMEL_CASE_NAME := $(shell echo $(APPLICATION_NAME) | perl -pe 's/(?:^|_)([a-z])/\u$$1/g')
app_BASE_DIR ?= base/
app_HEADER ?= $(APPLICATION_DIR)/include/$(app_BASE_DIR)$(CAMEL_CASE_NAME)Revision.h
app_HEADER := $(APPLICATION_DIR)/include/$(app_BASE_DIR)$(CAMEL_CASE_NAME)Revision.h
endif

# depend modules
Expand Down
1 change: 1 addition & 0 deletions modules/combined/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ include $(MODULE_DIR)/modules.mk
APPLICATION_DIR := $(MODULE_DIR)/combined
APPLICATION_NAME := combined
BUILD_EXEC := yes
GEN_REVISION := yes
# Sets INSTALLABLE_DIRS
include $(MOOSE_DIR)/modules/combined/combined_installable_dirs.mk
include $(FRAMEWORK_DIR)/app.mk
Expand Down
21 changes: 21 additions & 0 deletions modules/fluid_properties/fluid_properties.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ POTASSIUM_FP_CONTENT := $(shell ls $(POTASSIUM_FP_DIR) 2> /dev/null)
SODIUM_FP_DIR ?= ${MOOSE_DIR}/modules/fluid_properties/contrib/sodium
SODIUM_FP_CONTENT := $(shell ls $(SODIUM_FP_DIR) 2> /dev/null)

# Cache revision information
CAMEL_CASE_NAME_save := ${CAMEL_CASE_NAME}
app_BASE_DIR_save := ${app_BASE_DIR}
app_HEADER_save := ${app_HEADER}
GEN_REVISION_save := ${GEN_REVISION}

# AIR
ifneq ($(AIR_FP_CONTENT),)
ifneq ($(BUILDING_FP_APP), yes)
Expand All @@ -27,6 +33,7 @@ ifneq ($(BUILDING_FP_APP), yes)
APPLICATION_NAME := air
libmesh_CXXFLAGS += -DAIR_FP_ENABLED -DSKIP_MODULE_LOAD
GEN_REVISION := yes
DEPEND_MODULES += fluid_properties
include $(FRAMEWORK_DIR)/app.mk
include $(AIR_FP_DIR)/libSBTL_Air.mk
endif
Expand All @@ -40,6 +47,7 @@ ifneq ($(BUILDING_FP_APP), yes)
APPLICATION_NAME := carbon_dioxide
libmesh_CXXFLAGS += -DCARBON_DIOXIDE_FP_ENABLED -DSKIP_MODULE_LOAD
GEN_REVISION := yes
DEPEND_MODULES += fluid_properties
include $(FRAMEWORK_DIR)/app.mk
include $(CARBON_DIOXIDE_FP_DIR)/libSBTL_CarbonDioxide.mk
endif
Expand All @@ -53,6 +61,7 @@ ifneq ($(BUILDING_FP_APP), yes)
APPLICATION_NAME := nitrogen
libmesh_CXXFLAGS += -DNITROGEN_FP_ENABLED -DSKIP_MODULE_LOAD
GEN_REVISION := yes
DEPEND_MODULES += fluid_properties
include $(FRAMEWORK_DIR)/app.mk
include $(NITROGEN_FP_DIR)/libSBTL_Nitrogen.mk
endif
Expand All @@ -66,6 +75,7 @@ ifneq ($(BUILDING_FP_APP), yes)
APPLICATION_NAME := helium
libmesh_CXXFLAGS += -DHELIUM_FP_ENABLED -DSKIP_MODULE_LOAD
GEN_REVISION := yes
DEPEND_MODULES += fluid_properties
include $(FRAMEWORK_DIR)/app.mk
include $(HELIUM_FP_DIR)/libSBTL_Helium.mk
endif
Expand All @@ -79,6 +89,7 @@ ifneq ($(BUILDING_FP_APP), yes)
APPLICATION_NAME := potassium
libmesh_CXXFLAGS += -DPOTASSIUM_FP_ENABLED -DSKIP_MODULE_LOAD
GEN_REVISION := yes
DEPEND_MODULES += fluid_properties
include $(FRAMEWORK_DIR)/app.mk
include $(POTASSIUM_FP_DIR)/libPotassiumProperties.mk
endif
Expand All @@ -92,7 +103,17 @@ ifneq ($(BUILDING_FP_APP), yes)
APPLICATION_NAME := sodium
libmesh_CXXFLAGS += -DSODIUM_FP_ENABLED -DSKIP_MODULE_LOAD
GEN_REVISION := yes
DEPEND_MODULES += fluid_properties
include $(FRAMEWORK_DIR)/app.mk
include $(SODIUM_FP_DIR)/libSodiumProperties.mk
endif
endif

# If building any fluid property submodule, we need to clear those before app.mk gets included
# for any other module, as those modules do not generate a revision
ifneq ($(AIR_FP_CONTENT)$(CARBON_DIOXIDE_FP_CONTENT)$(HELIUM_FP_CONTENT)$(NITROGEN_FP_CONTENT)$(POTASSIUM_FP_CONTENT)$(SODIUM_FP_CONTENT),)
CAMEL_CASE_NAME := ${CAMEL_CASE_NAME_save}
app_BASE_DIR := ${app_BASE_DIR_save}
app_HEADER := ${app_HEADER_save}
GEN_REVISION := ${GEN_REVISION_save}
endif

0 comments on commit c889ff8

Please sign in to comment.