Skip to content

Commit 8a8df53

Browse files
committed
[OpenBLAS]:modifed the Makefile
[Description]: check the compiler version and show the detail info
1 parent 13f9afb commit 8a8df53

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

Makefile

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,21 @@ ifneq ($(INTERFACE64), 0)
5656
@echo " Use 64 bits int (equivalent to \"-i8\" in Fortran) "
5757
endif
5858
endif
59-
@cverinfo=`$(CC) --version | sed -n '1p'`; \
60-
echo " C compiler ... $(C_COMPILER) (cmd & version : $${cverinfo})"
59+
@$(CC) --version > /dev/null 2>&1;\
60+
if [ $$? -eq 0 ]; then \
61+
cverinfo=`$(CC) --version | sed -n '1p'`; \
62+
echo " C compiler ... $(C_COMPILER) (cmd & version : $${cverinfo})";\
63+
else \
64+
echo " C compiler ... $(C_COMPILER) (command line : $(CC))";\
65+
fi
6166
ifeq ($(NOFORTRAN), $(filter 0,$(NOFORTRAN)))
62-
@fverinfo=`$(FC) --version | sed -n '1p'`; \
63-
echo " Fortran compiler ... $(F_COMPILER) (cmd & version : $${fverinfo})"
67+
@$(FC) --version > /dev/null 2>&1;\
68+
if [ $$? -eq 0 ]; then \
69+
fverinfo=`$(FC) --version | sed -n '1p'`; \
70+
echo " Fortran compiler ... $(F_COMPILER) (cmd & version : $${fverinfo})";\
71+
else \
72+
echo " Fortran compiler ... $(F_COMPILER) (command line : $(FC))";\
73+
fi
6474
endif
6575
ifneq ($(OSNAME), AIX)
6676
@echo -n " Library Name ... $(LIBNAME)"

0 commit comments

Comments
 (0)