make : fix incorrect GF_CC_VER for CUDA host compiler
We intentionally craft a GF_CC for CUDA that will fail but print the desired version anyway. So instead of checking whether the version command was successful, we need to check if the command printed anything.
This commit is contained in:
parent
d42a8bf134
commit
b51b78ea90
1 changed files with 1 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
|||
ifeq '' '$(findstring clang,$(shell $(GF_CC) --version))'
|
||||
GF_CC_IS_GCC = 1
|
||||
GF_CC_VER := $(shell { $(GF_CC) -dumpfullversion 2>/dev/null || $(GF_CC) -dumpversion; } | awk -F. '{ printf("%02d%02d%02d", $$1, $$2, $$3) }')
|
||||
GF_CC_VER := $(shell { $(GF_CC) -dumpfullversion 2>/dev/null; echo; $(GF_CC) -dumpversion; } | awk -F. '/./ { printf("%02d%02d%02d", $$1, $$2, $$3); exit }')
|
||||
else
|
||||
GF_CC_IS_CLANG = 1
|
||||
ifeq '' '$(findstring Apple,$(shell $(GF_CC) --version))'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue