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

26 escape.git.version.string #27

Merged
merged 3 commits into from
Nov 12, 2019
Merged
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
4 changes: 2 additions & 2 deletions bin/mkmf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ sub ensureTrailingSlash {
local $/ = '/'; chomp @_[0]; @_[0] .= '/';
}

my $version = '19.3.0';
my $version = '19.3.1';

# initialize variables: use getopts for these
GetOptions("abspath|a=s" => \$opt_a,
Expand Down Expand Up @@ -142,7 +142,7 @@ if ( $opt_c ) {
}

if ( $opt_g ) {
$opt_c .= ' -D_FILE_VERSION="`git-version-string $<`"';
$opt_c .= ' -D_FILE_VERSION=\"`git-version-string $<`\"';
}

&print_formatted_list("CPPDEFS = $opt_c") if $opt_c;
Expand Down
2 changes: 1 addition & 1 deletion t/t003-mkmf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ teardown() {
run mkmf -g
[ "$status" -eq 0 ]
[ -e Makefile ]
regexString='^CPPDEFS = -D_FILE_VERSION="`git-version-string $<`"$'
regexString='^CPPDEFS = -D_FILE_VERSION=\\"`git-version-string $<`\\"$'
run grep -q "${regexString}" Makefile
[ "$status" -eq 0 ]
}
Expand Down
9 changes: 7 additions & 2 deletions templates/macOS-gnu8-mpich3.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Template for the GNU Compiler on macOS
# Template for the GNU Compiler on macOS
# Tested on macOS Mojave (version 10.14.2), with gnu 8.2 and mpich 3.3
#
# Typical use with mkmf
Expand Down Expand Up @@ -81,11 +81,16 @@ $(error Options DEBUG and TEST cannot be used together)
endif
endif

# Get number of CPUs
# Get number of CPUs
#MAKEFLAGS += --jobs=$(shell grep '^processor' /proc/cpuinfo | wc -l)
MAKEFLAGS += --jobs=$(shell sysctl -n hw.ncpu)

# Macro for Fortran preprocessor
FPPFLAGS := $(INCLUDES)
# Add -D__APPLE__ for Fortran if on OSX (i.e. Darwin)
ifeq ($(shell uname -s),Darwin)
FPPFLAGS += -D__APPLE__
endif
# Fortran Compiler flags for the NetCDF library
FPPFLAGS += $(shell nf-config --fflags)
# Fortran Compiler flags for the MPICH MPI library
Expand Down
9 changes: 8 additions & 1 deletion templates/osx-gnu.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# mkmf -t osx-gnu.mk -c"-Duse_libMPI -Duse_netCDF" path_names /usr/local/include

############
# Commands Macors
# Commands Macros
FC = mpif90
CC = mpicc
CXX = mpicxx
Expand Down Expand Up @@ -76,10 +76,17 @@ $(error Options DEBUG and TEST cannot be used together)
endif
endif

# Get number of CPUs
MAKEFLAGS += --jobs=$(shell sysctl -n hw.ncpu)

# Macro for Fortran preprocessor
FPPFLAGS := $(INCLUDES)

# Add -D__APPLE__ for Fortran if on OSX (i.e. Darwin)
ifeq ($(shell uname -s),Darwin)
FPPFLAGS += -D__APPLE__
endif

# Fortran Compiler flags for the NetCDF library
FPPFLAGS += $(shell nf-config --fflags)

Expand Down