From d3fa52748bc3d44065a76c494ee0e1a4ceb0ec09 Mon Sep 17 00:00:00 2001 From: James Price Date: Thu, 23 Feb 2017 15:52:28 +0000 Subject: [PATCH] Add Clang support to OpenMP.make --- OpenMP.make | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/OpenMP.make b/OpenMP.make index 115c678..f111847 100644 --- a/OpenMP.make +++ b/OpenMP.make @@ -7,23 +7,30 @@ COMPILER_ = $(CXX) COMPILER_GNU = g++ COMPILER_INTEL = icpc COMPILER_CRAY = CC +COMPILER_CLANG = clang++ CC = $(COMPILER_$(COMPILER)) FLAGS_ = -O3 FLAGS_GNU = -O3 -std=c++11 FLAGS_INTEL = -O3 -std=c++11 FLAGS_CRAY = -O3 -hstd=c++11 +FLAGS_CLANG = -O3 -std=c++11 CFLAGS = $(FLAGS_$(COMPILER)) -OMP_ = +OMP_ = OMP_GNU = -fopenmp OMP_INTEL = -qopenmp OMP_CRAY = +OMP_CLANG = -fopenmp=libomp OMP = $(OMP_$(COMPILER)) +OMP_TARGET_ = +OMP_TARGET_CLANG = -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda +OMP_TARGET = $(OMP_TARGET_$(COMPILER)) + omp-stream: main.cpp OMPStream.cpp - $(CC) -O3 -std=c++11 -DOMP $^ $(OMP) -o $@ + $(CC) -O3 -std=c++11 -DOMP $^ $(OMP) $(EXTRA_FLAGS) -o $@ omp-target-stream: main.cpp OMPStream.cpp - $(CC) -O3 -std=c++11 -DOMP -DOMP_TARGET_GPU $^ $(OMP) -o $@ + $(CC) -O3 -std=c++11 -DOMP -DOMP_TARGET_GPU $^ $(OMP_TARGET) $(EXTRA_FLAGS) -o $@