From 74f2ff7d473a5b5a768d8d5f82d7a90d47ea66dc Mon Sep 17 00:00:00 2001 From: KatolaZ Date: Thu, 30 Apr 2020 17:18:07 +0100 Subject: [PATCH] fixed other error in compiler check --- Reducibility_Multiplex/Makefile | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/Reducibility_Multiplex/Makefile b/Reducibility_Multiplex/Makefile index d78d27c..011cbd7 100644 --- a/Reducibility_Multiplex/Makefile +++ b/Reducibility_Multiplex/Makefile @@ -2,26 +2,24 @@ CC=gcc CFLAGS=-O2 LDFLAGS=-lm -lgmp -lz -HAVE_CC=$(shell $(CC) --version ; echo \$?) -IS_CC_GCC=$(shell $(CC) --version | grep -Eic 'gcc' || echo "NUL") -IS_CC_CLANG=$(shell $(CC) --version | grep -Eic '(llvm|clang)' || echo "NUL") -IS_CC_ICC=$(shell $(CC) --version | grep -Eic 'Intel' || echo "NUL") +IS_CC_GCC=$(shell $(CC) --version 2>/dev/null | grep -Eic 'gcc') +IS_CC_CLANG=$(shell $(CC) --version | grep -Eic '(llvm|clang)') +IS_CC_ICC=$(shell $(CC) --version | grep -Eic 'Intel') -ifneq ($(IS_CC_GCC),"NUL") +ifneq ($(IS_CC_GCC), 0) # compiler is GCC - CFLAGS+=-fopenmp + CFLAGS+=-fopenmp else - ifneq ($(IS_CC_CGLANG), "NUL") +ifneq ($(IS_CC_CLANG), 0) # compiler is CLANG - LDFLAGS+=-lomp - else - ifneq ($(IS_CC_ICC), "NUL") + LDFLAGS+=-lomp +else +ifneq($(IS_CC_ICC), 0) # compiler is Intel icc - CFLAGS+=-qopenmp - endif - endif + CFLAGS+=-qopenmp +endif endif