Skip to content

Commit

Permalink
Fixes #164 - OpenMP fix for gmake builds
Browse files Browse the repository at this point in the history
The previous patch fixed the OpenMP issue for projects using cmake.
This fix provides the same remedy for builds using GNU make.
  • Loading branch information
tclune committed Dec 8, 2019
1 parent e6252cd commit 1779441
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmake/PFUNIT.mk.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,22 @@ PFUNIT_BIN_DIR := $(PFUNIT_TOP_DIR)/bin
PFUNIT_INCLUDE_DIR := $(PFUNIT_TOP_DIR)/include

PFUNIT_EXTRA_FFLAGS := -I$(GFTL_INCLUDE_DIR) -I$(GFTL_SHARED_INCLUDE_DIR) -I$(FARGPARSE_INCLUDE_DIR) -I$(PFUNIT_INCLUDE_DIR) -I.
PFUNIT_EXTRA_FFLAGS += @OpenMP_Fortran_FLAGS@
ifeq ($(USEMPI),YES)
PFUNIT_EXTRA_FFLAGS += $(foreach inc,$(subst ;, ,@MPI_Fortran_INCLUDE_DIRS@), -I$(inc))
endif

PFUNIT_LIBRARIES := -L$(PFUNIT_TOP_DIR)/lib

ifeq ($(USEMPI),YES)
PFUNIT_LIBRARIES += -lpfunit
endif
PFUNIT_LIBRARIES += -lfunit $(FARGPARSE_LIBRARIES)
ifeq ($(USEMPI),YES)
PFUNIT_LIBRARIES += $(subst ;, ,@MPI_Fortran_LIBRARIES@)
endif
PFUNIT_LIBRARIES += @OpenMP_Fortran_LIBRARIES@



###########
Expand Down

0 comments on commit 1779441

Please sign in to comment.