Skip to content
Snippets Groups Projects
Commit 63ae2098 authored by Pietro Incardona's avatar Pietro Incardona
Browse files

Fixing CMake

parent fac22d37
No related branches found
No related tags found
No related merge requests found
......@@ -154,6 +154,10 @@ else()
message( FATAL_ERROR "BOOST is required in order to install OpenFPM" )
endif()
if (OPENMP_FOUND)
file(WRITE openmp_flags ${OpenMP_CXX_FLAGS})
endif()
if(ENABLE_GPU AND CUDA_FOUND)
set(DEFINE_CUDA_GPU "#define CUDA_GPU")
endif()
......
......@@ -3,13 +3,19 @@ include ../../example.mk
### internally the example disable with the preprocessor its code if not compiled with nvcc
CUDA_CC=
CUDA_CC_LINK=
ifeq (, $(shell which nvcc))
ifdef CUDA_ON_CPU
CUDA_CC=mpic++ -x c++ $(INCLUDE_PATH)
INCLUDE_PATH_NVCC=
CUDA_CC_LINK=mpic++
else
CUDA_CC=nvcc -ccbin=mpic++
CUDA_CC_LINK=nvcc -ccbin=mpic++
ifeq (, $(shell which nvcc))
CUDA_CC=mpic++ -x c++ $(INCLUDE_PATH)
INCLUDE_PATH_NVCC=
CUDA_CC_LINK=mpic++
else
CUDA_CC=nvcc -ccbin=mpic++
CUDA_CC_LINK=nvcc -ccbin=mpic++
endif
endif
gray_scott_sparse_gpu_test: OPT += -DTEST_RUN
......
......@@ -9,7 +9,7 @@ gray_scott_sparse_surface_cs_test: OPT += -DTEST_RUN
gray_scott_sparse_surface_cs_test: gray_scott_sparse_surface_cs
%.o: %.cpp
$(CC) -O3 -g $(OPT) -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
$(CC) -O3 -g $(OPT) -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
gray_scott_sparse_surface_cs: $(OBJ)
$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment