Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add macro for standards compliance flag #58

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions templates/ncrc4-intel.mk
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ ISA = -xsse2 # The Intel Instruction Set Archetecture (ISA) compile

COVERAGE = # Add the code coverage compile options.

STANDARD = # Issue warnings for the given Fortran standard (f90, f95, f03, f08, f18)
# Implies VERBOSE for output

# Need to use at least GNU Make version 3.81
need := 3.81
ok := $(filter $(need),$(firstword $(sort $(MAKE_VERSION) $(need))))
Expand Down Expand Up @@ -100,6 +103,7 @@ FFLAGS_OPENMP = -qopenmp
FFLAGS_OVERRIDE_LIMITS = -qoverride-limits
FFLAGS_VERBOSE = -v -V -what -warn all
FFLAGS_COVERAGE = -prof-gen=srcpos
FFLAGS_STANDARD = -stand $(STANDARD)

# Macro for C preprocessor
CPPFLAGS := -D__IFC $(INCLUDES)
Expand Down Expand Up @@ -163,6 +167,11 @@ ifdef NO_OVERRIDE_LIMITS
FFLAGS += $(FFLAGS_OVERRIDE_LIMITS)
endif

ifdef STANDARD
FFLAGS += $(FFLAGS_STANDARD)
VERBOSE = 1
endif

ifdef VERBOSE
CFLAGS += $(CFLAGS_VERBOSE)
FFLAGS += $(FFLAGS_VERBOSE)
Expand Down
10 changes: 10 additions & 0 deletions templates/ncrc5-intel-classic.mk
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ ISA =

COVERAGE = # Add the code coverage compile options.

STANDARD = # Issue warnings for the given Fortran standard (f90, f95, f03, f08, f18)
# Implies VERBOSE for warning output

# Need to use at least GNU Make version 3.81
need := 3.81
ok := $(filter $(need),$(firstword $(sort $(MAKE_VERSION) $(need))))
Expand Down Expand Up @@ -112,6 +115,7 @@ FFLAGS_OPENMP = -qopenmp
FFLAGS_OVERRIDE_LIMITS = -qoverride-limits
FFLAGS_VERBOSE = -v -V -what -warn all -qopt-report-phase=vec -qopt-report=2
FFLAGS_COVERAGE = -prof-gen=srcpos
FFLAGS_STANDARD = -stand $(STANDARD)

# Macro for C preprocessor
CPPFLAGS := -D__IFC $(INCLUDES)
Expand Down Expand Up @@ -170,6 +174,11 @@ ifdef NO_OVERRIDE_LIMITS
FFLAGS += $(FFLAGS_OVERRIDE_LIMITS)
endif

ifdef STANDARD
FFLAGS += $(FFLAGS_STANDARD)
VERBOSE = 1
endif

ifdef VERBOSE
CFLAGS += $(CFLAGS_VERBOSE)
FFLAGS += $(FFLAGS_VERBOSE)
Expand All @@ -190,6 +199,7 @@ FFLAGS += $(FFLAGS_COVERAGE) $(PROF_DIR)
LDFLAGS += $(LDFLAGS_COVERAGE) $(PROF_DIR)
endif


LDFLAGS += $(LIBS)

#---------------------------------------------------------------------------
Expand Down
9 changes: 9 additions & 0 deletions templates/ncrc5-intel-oneapi.mk
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ ISA =

COVERAGE = # Add the code coverage compile options.

STANDARD = # Issue warnings for the given Fortran standard (f90, f95, f03, f08, f18)
# Implies VERBOSE for output

# Need to use at least GNU Make version 3.81
need := 3.81
ok := $(filter $(need),$(firstword $(sort $(MAKE_VERSION) $(need))))
Expand Down Expand Up @@ -112,6 +115,7 @@ FFLAGS_OPENMP = -qopenmp
FFLAGS_OVERRIDE_LIMITS = -qoverride-limits
FFLAGS_VERBOSE = -v -V -what -warn all -qopt-report-phase=vec -qopt-report=2
FFLAGS_COVERAGE = -prof-gen=srcpos
FFLAGS_STANDARD = -stand $(STANDARD)

# Macro for C preprocessor
CPPFLAGS := -D__IFC $(INCLUDES)
Expand Down Expand Up @@ -170,6 +174,11 @@ ifdef NO_OVERRIDE_LIMITS
FFLAGS += $(FFLAGS_OVERRIDE_LIMITS)
endif

ifdef STANDARD
FFLAGS += $(FFLAGS_STANDARD)
VERBOSE = 1
endif

ifdef VERBOSE
CFLAGS += $(CFLAGS_VERBOSE)
FFLAGS += $(FFLAGS_VERBOSE)
Expand Down
9 changes: 9 additions & 0 deletions templates/ncrc5-intel.mk
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ ISA =

COVERAGE = # Add the code coverage compile options.

STANDARD = # Issue warnings for the given Fortran standard (f90, f95, f03, f08, f18)
# Implies VERBOSE for output

# Need to use at least GNU Make version 3.81
need := 3.81
ok := $(filter $(need),$(firstword $(sort $(MAKE_VERSION) $(need))))
Expand Down Expand Up @@ -112,6 +115,7 @@ FFLAGS_OPENMP = -qopenmp
FFLAGS_OVERRIDE_LIMITS = -qoverride-limits
FFLAGS_VERBOSE = -v -V -what -warn all -qopt-report-phase=vec -qopt-report=2
FFLAGS_COVERAGE = -prof-gen=srcpos
FFLAGS_STANDARD = -stand $(STANDARD)

# Macro for C preprocessor
CPPFLAGS := -D__IFC $(INCLUDES)
Expand Down Expand Up @@ -170,6 +174,11 @@ ifdef NO_OVERRIDE_LIMITS
FFLAGS += $(FFLAGS_OVERRIDE_LIMITS)
endif

ifdef STANDARD
FFLAGS += $(FFLAGS_STANDARD)
VERBOSE = 1
endif

ifdef VERBOSE
CFLAGS += $(CFLAGS_VERBOSE)
FFLAGS += $(FFLAGS_VERBOSE)
Expand Down