Skip to content

Commit

Permalink
GNU Make: set COMP_VERSION for hipcc and nvcc (AMReX-Codes#3771)
Browse files Browse the repository at this point in the history
This makes the hipcc and nvcc compiler versions available from
`buildInfoGetCompVersion()`.
  • Loading branch information
yut23 authored Feb 20, 2024
1 parent 4ebd5e0 commit 3003edb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions Tools/GNUMake/comps/hip.mak
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ ifneq ($(NO_CONFIG_CHECKING),TRUE)
ifeq ($(HIP_PATH),)
$(error hipconfig failed. Is the HIP toolkit available?)
endif
COMP_VERSION = $(hipcc_version)
endif

CXX = $(HIP_PATH)/bin/hipcc
Expand Down
1 change: 1 addition & 0 deletions Tools/GNUMake/comps/nvcc.mak
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ ifneq ($(NO_CONFIG_CHECKING),TRUE)
nvcc_version := $(shell nvcc --version | grep "release" | awk 'BEGIN {FS = ","} {print $$2}' | awk '{print $$2}')
nvcc_major_version := $(shell nvcc --version | grep "release" | awk 'BEGIN {FS = ","} {print $$2}' | awk '{print $$2}' | awk 'BEGIN {FS = "."} {print $$1}')
nvcc_minor_version := $(shell nvcc --version | grep "release" | awk 'BEGIN {FS = ","} {print $$2}' | awk '{print $$2}' | awk 'BEGIN {FS = "."} {print $$2}')
COMP_VERSION = $(nvcc_version)
else
nvcc_version := 99.9
nvcc_major_version := 99
Expand Down

0 comments on commit 3003edb

Please sign in to comment.