Skip to content

Commit

Permalink
Use CXXFLAGS everywhere for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
jrprice committed Feb 23, 2017
1 parent 063446b commit d78baa4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions OpenACC.make
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ FLAGS_PGI += -ta=multicore
endif

FLAGS_CRAY = -hstd=c++11
CFLAGS = $(FLAGS_$(COMPILER))
CXXFLAGS = $(FLAGS_$(COMPILER))

acc-stream: main.cpp ACCStream.cpp
$(CXX) $(CFLAGS) -DACC $^ $(EXTRA_FLAGS) -o $@
$(CXX) $(CXXFLAGS) -DACC $^ $(EXTRA_FLAGS) -o $@

4 changes: 2 additions & 2 deletions OpenCL.make
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ COMPILER_CRAY = CC
FLAGS_ = -O3
FLAGS_GNU = -O3 -std=c++11
FLAGS_CRAY = -O3 -hstd=c++11
CFLAGS=$(FLAGS_$(COMPILER))
CXXFLAGS=$(FLAGS_$(COMPILER))

ocl-stream: main.cpp OCLStream.cpp
$(COMPILER_$(COMPILER)) $(CFLAGS) -DOCL $^ $(EXTRA_FLAGS) -lOpenCL -o $@
$(COMPILER_$(COMPILER)) $(CXXFLAGS) -DOCL $^ $(EXTRA_FLAGS) -lOpenCL -o $@

13 changes: 6 additions & 7 deletions RAJA.make
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ endif

ifeq ($(TARGET), CPU)
COMP=$(CXX)
CFLAGS = -O3 -std=c++11 -DRAJA_TARGET_CPU
CXXFLAGS = -O3 -std=c++11 -DRAJA_TARGET_CPU

ifndef COMPILER
$(error No COMPILER defined. Specify COMPILER for correct OpenMP flag.)
endif
ifeq ($(COMPILER), INTEL)
COMP = icpc
CFLAGS += -qopenmp
CXXFLAGS += -qopenmp
else ifeq ($(COMPILER), GNU)
COMP = g++
CFLAGS += -fopenmp
CXXFLAGS += -fopenmp
else ifeq ($(COMPILER), CRAY)
COMP = CC
CFLAGS +=
CXXFLAGS +=
endif

else ifeq ($(TARGET), GPU)
Expand All @@ -28,9 +28,8 @@ COMP = nvcc
ifndef ARCH
$(error No ARCH defined. Specify target GPU architecture (e.g. ARCH=sm_35))
endif
CFLAGS = --expt-extended-lambda -O3 -std=c++11 -x cu -Xcompiler -fopenmp -arch $(ARCH)
CXXFLAGS = --expt-extended-lambda -O3 -std=c++11 -x cu -Xcompiler -fopenmp -arch $(ARCH)
endif

raja-stream: main.cpp RAJAStream.cpp
$(COMP) $(CFLAGS) -DUSE_RAJA -I$(RAJA_PATH)/include $^ $(EXTRA_FLAGS) -L$(RAJA_PATH)/lib -lRAJA -o $@

$(COMP) $(CXXFLAGS) -DUSE_RAJA -I$(RAJA_PATH)/include $^ $(EXTRA_FLAGS) -L$(RAJA_PATH)/lib -lRAJA -o $@

0 comments on commit d78baa4

Please sign in to comment.