Skip to content

Commit

Permalink
Merge commit 'ad409367e365d3227cf9c1a0df63b3b9cde9b916'
Browse files Browse the repository at this point in the history
  • Loading branch information
moosetest committed Jan 9, 2024
2 parents a641d6d + ad40936 commit 8c776d8
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 9 deletions.
13 changes: 7 additions & 6 deletions framework/app.mk
Original file line number Diff line number Diff line change
Expand Up @@ -79,24 +79,25 @@ $(eval $(call unity_dir_rule, $(unity_src_dir)))
# The idea here is that if all they have is src then it's a big jumble of stuff
# that won't benefit from unity building
# Also, exclude the base directory by default because it's another big jumble
# of unrelated stuff
non_unity_dirs := %.libs %/src %src/base $(app_non_unity_dirs)
# of unrelated stuff.
non_unity_dirs := %.libs %/src $(app_non_unity_dirs)

# Find all of the individual subdirectories
# Find all of the top-level subdirectories in our src folder(s)
# We will create a Unity file for each individual subdirectory
# The idea is that files grouped withing a subdirectory are closely related
# and will benefit from a Unity build
srcsubdirs := $(shell find $(APPLICATION_DIR)/src -type d -not -path '*/.libs*')
srcsubdirs := $(shell find $(APPLICATION_DIR)/src -maxdepth 1 -type d -not -path '*/.libs*')
allsrcsubdirs := $(shell find $(APPLICATION_DIR)/src -type d -not -path '*/.libs*')

# Filter out the paths we don't want to Unity build
unity_srcsubdirs := $(filter-out $(non_unity_dirs), $(srcsubdirs))
non_unity_srcsubdirs := $(filter $(non_unity_dirs), $(srcsubdirs))
non_unity_srcsubdirs := $(filter $(non_unity_dirs), $(allsrcsubdirs))

# This is a biggie
# Loop over the subdirectories, creating a rule to create the Unity source file
# for each subdirectory. To do that we need to create a unique name using the
# full hierarchy of the path underneath src
$(foreach srcsubdir,$(unity_srcsubdirs),$(eval $(call unity_file_rule,$(call unity_unique_name,$(unity_src_dir),$(APPLICATION_DIR),$(srcsubdir)),$(shell find $(srcsubdir) -maxdepth 1 \( -type f -o -type l \) -regex "[^\#~]*\.C"),$(srcsubdir),$(unity_src_dir))))
$(foreach srcsubdir,$(unity_srcsubdirs),$(eval $(call unity_file_rule,$(call unity_unique_name,$(unity_src_dir),$(APPLICATION_DIR),$(srcsubdir)),$(shell find $(srcsubdir) \( -type f -o -type l \) -regex "[^\#~]*\.C"),$(srcsubdir),$(unity_src_dir))))

# This creates the whole list of Unity source files so we can use it as a dependency
app_unity_srcfiles := $(foreach srcsubdir,$(unity_srcsubdirs),$(call unity_unique_name,$(unity_src_dir),$(APPLICATION_DIR),$(srcsubdir)))
Expand Down
8 changes: 5 additions & 3 deletions framework/moose.mk
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,9 @@ moose_LIBS := $(moose_LIB) $(pcre_LIB) $(hit_LIB)
### Unity Build ###
ifeq ($(MOOSE_UNITY),true)

srcsubdirs := $(shell find $(FRAMEWORK_DIR)/src -type d -not -path '*/.libs*')
# Top level source directories in MOOSE
srcsubdirs := $(shell find $(FRAMEWORK_DIR)/src -mindepth 1 -maxdepth 1 -type d -not -path '*/.libs*')
allsrcsubdirs := $(shell find $(FRAMEWORK_DIR)/src -type d -not -path '*/.libs*')

# This folder does not build with unity
moose_non_unity := %/utils_nonunity
Expand All @@ -243,7 +245,7 @@ endif
unity_src_dir := $(FRAMEWORK_DIR)/build/unity_src

unity_srcsubdirs := $(filter-out $(moose_non_unity), $(srcsubdirs))
non_unity_srcsubdirs := $(filter $(moose_non_unity), $(srcsubdirs))
non_unity_srcsubdirs := $(filter $(moose_non_unity), $(allsrcsubdirs))

define unity_dir_rule
$(1):
Expand Down Expand Up @@ -293,7 +295,7 @@ unity_unique_name = $(1)/$(subst /,_,$(patsubst $(2)/%,%,$(patsubst $(2)/src/%,%
# 4. Now that we have the name of the Unity file we need to find all of the .C files that should be #included in it
# 4a. Use find to pick up all .C files
# 4b. Make sure we don't pick up any _Unity.C files (we shouldn't have any anyway)
$(foreach srcsubdir,$(unity_srcsubdirs),$(eval $(call unity_file_rule,$(call unity_unique_name,$(unity_src_dir),$(FRAMEWORK_DIR),$(srcsubdir)),$(shell find $(srcsubdir) -maxdepth 1 \( -type f -o -type l \) -name "*.C"),$(srcsubdir),$(unity_src_dir))))
$(foreach srcsubdir,$(unity_srcsubdirs),$(eval $(call unity_file_rule,$(call unity_unique_name,$(unity_src_dir),$(FRAMEWORK_DIR),$(srcsubdir)),$(shell find $(srcsubdir) \( -type f -o -type l \) -name "*.C"),$(srcsubdir),$(unity_src_dir))))

app_unity_srcfiles := $(foreach srcsubdir,$(unity_srcsubdirs),$(call unity_unique_name,$(unity_src_dir),$(FRAMEWORK_DIR),$(srcsubdir)))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,23 @@

!include training/more_detail/generic_moose_training.md

#### Location Details

- Towneplace Suites, Marriott Champaign

- Recommended. About a 15 minute walk to venue and it is in a more central location to campus town.

- Hampton Inn

- About 5 minute walk to the venue.


#### Directions to venue:

!style! halign=left
Room 1040, National Center for Supercomputing Applications (1205 W Clark St, Urbana, IL 61801)
Parking is available at both hotels, which are a close walk to venue. Most of the other parking
nearby is for the university (permits are required).
!style-end!

[Back](training/index.md)

0 comments on commit 8c776d8

Please sign in to comment.