Skip to content

Commit

Permalink
Makefile: set the default ARCH from a Spack env if available
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-zero committed Apr 19, 2020
1 parent a91bc39 commit 65eea7c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@ ifeq ($(CP2KHOME),)
CP2KHOME := $(abspath $(shell pwd))
export CP2KHOME
endif
ARCH := local

ifneq ($(SPACK_COMPILER_SPEC),)
# SPACK_COMPILER_SPEC is set when running in a Spack build-env
ARCH := $(shell spack arch)-$(shell echo $${SPACK_COMPILER_SPEC%%@*})
else
ARCH := local
endif

export VERSION=sopt

MAKEFILE := $(CP2KHOME)/Makefile
Expand Down

0 comments on commit 65eea7c

Please sign in to comment.