fix compiler detection

enzo-makefile
KatolaZ 5 years ago
parent ce8a330797
commit f5fab30540
  1. 12
      Reducibility_Multiplex/Makefile

@ -4,20 +4,20 @@ LDFLAGS=-lm -lgmp -lz
HAVE_CC=$(shell $(CC) --version ; echo \$?) HAVE_CC=$(shell $(CC) --version ; echo \$?)
IS_CC_GCC=$(shell $(CC) --version | grep -Eic 'gcc' || echo "0") IS_CC_GCC=$(shell $(CC) --version | grep -Eic 'gcc' || echo "NUL")
IS_CC_CLANG=$(shell $(CC) --version | grep -Eic '(llvm|clang)' || echo "0") IS_CC_CLANG=$(shell $(CC) --version | grep -Eic '(llvm|clang)' || echo "NUL")
IS_CC_ICC=$(shell $(CC) --version | grep -Eic 'Intel' || echo "0") IS_CC_ICC=$(shell $(CC) --version | grep -Eic 'Intel' || echo "NUL")
ifeq ($(IS_CC_GCC), 1) ifneq ($(IS_CC_GCC),"NUL")
# compiler is GCC # compiler is GCC
CFLAGS+=-fopenmp CFLAGS+=-fopenmp
else else
ifeq ($(IS_CC_CGLANG), 1) ifneq ($(IS_CC_CGLANG), "NUL")
# compiler is CLANG # compiler is CLANG
LDFLAGS+=-lomp LDFLAGS+=-lomp
else else
ifeq ($(IS_CC_ICC), 1) ifneq ($(IS_CC_ICC), "NUL")
# compiler is Intel icc # compiler is Intel icc
CFLAGS+=-qopenmp CFLAGS+=-qopenmp
endif endif

Loading…
Cancel
Save