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