Allow user to override CXX in OpenCL.make
This commit is contained in:
parent
569cfa1d31
commit
dfe5503cba
@ -1,18 +1,20 @@
|
||||
|
||||
ifndef COMPILER
|
||||
define compiler_help
|
||||
Set COMPILER to ensure correct flags are set.
|
||||
Set COMPILER to change flags (defaulting to GNU).
|
||||
Available compilers are:
|
||||
GNU CLANG INTEL CRAY
|
||||
|
||||
endef
|
||||
$(info $(compiler_help))
|
||||
COMPILER=GNU
|
||||
endif
|
||||
|
||||
COMPILER_ = $(CXX)
|
||||
COMPILER_GNU = g++
|
||||
COMPILER_CLANG = clang++
|
||||
COMPILER_INTEL = icpc
|
||||
COMPILER_CRAY = CC
|
||||
CXX = $(COMPILER_$(COMPILER))
|
||||
|
||||
FLAGS_ = -O3 -std=c++11
|
||||
FLAGS_GNU = -O3 -std=c++11
|
||||
@ -29,7 +31,7 @@ else
|
||||
endif
|
||||
|
||||
ocl-stream: main.cpp OCLStream.cpp
|
||||
$(COMPILER_$(COMPILER)) $(CXXFLAGS) -DOCL $^ $(EXTRA_FLAGS) $(LIBS) -o $@
|
||||
$(CXX) $(CXXFLAGS) -DOCL $^ $(EXTRA_FLAGS) $(LIBS) -o $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user