From 3003edb3b5bd58ce5c460f09ac78c5ab8a6c4b92 Mon Sep 17 00:00:00 2001 From: "Eric T. Johnson" Date: Tue, 20 Feb 2024 14:49:49 -0500 Subject: [PATCH] GNU Make: set COMP_VERSION for hipcc and nvcc (#3771) This makes the hipcc and nvcc compiler versions available from `buildInfoGetCompVersion()`. --- Tools/GNUMake/comps/hip.mak | 1 + Tools/GNUMake/comps/nvcc.mak | 1 + 2 files changed, 2 insertions(+) diff --git a/Tools/GNUMake/comps/hip.mak b/Tools/GNUMake/comps/hip.mak index f887b206e4c..9a48b59b98e 100644 --- a/Tools/GNUMake/comps/hip.mak +++ b/Tools/GNUMake/comps/hip.mak @@ -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 diff --git a/Tools/GNUMake/comps/nvcc.mak b/Tools/GNUMake/comps/nvcc.mak index 7274b2ec225..bd79969a29a 100644 --- a/Tools/GNUMake/comps/nvcc.mak +++ b/Tools/GNUMake/comps/nvcc.mak @@ -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