Commit f4f7bc3b authored by incardon's avatar incardon

Fixing to compile without a GPU

parent 02b1a724
Pipeline #702 failed with stages
in 6 seconds
cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
project(openfpm_pdata LANGUAGES C CXX CUDA)
project(openfpm_pdata LANGUAGES C CXX)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/CMakeFiles/)
......@@ -11,9 +11,12 @@ set(SE_CLASS2 CACHE BOOL "Activate compilation with SE_CLASS2")
set(SE_CLASS3 CACHE BOOL "Activate compilation with SE_CLASS3")
set(ENABLE_GPU CACHE BOOL "Disable the GPU code independently that a cuda compiler is found")
if (ENABLE_GPU)
enable_language(CUDA)
find_package(CUDA)
endif()
find_package(Boost 1.52.0 REQUIRED unit_test_framework iostreams program_options)
find_package(CUDA)
find_package(LibHilbert REQUIRED)
......@@ -31,7 +34,7 @@ if(SE_CLASS3)
set(DEFINE_SE_CLASS3 "#define SE_CLASS3")
endif()
if(CUDA_FOUND AND ENABLE_GPU)
if(CUDA_FOUND)
set(DEFINE_CUDA_GPU "#define CUDA_GPU")
endif()
......
......@@ -14,14 +14,6 @@
#if defined(CUDA_GPU) && defined(__NVCC__)
#include "util/cuda/moderngpu/context.hxx"
#include "util/cuda/moderngpu/kernel_mergesort.hxx"
#else
//! unused stub to make the code compile
namespace mgpu
{
typedef int standard_context_t;
}
#endif
/*! \brief Check this is a gpu or cpu type cell-list
......
......@@ -69,6 +69,17 @@
#define __device__
#endif
namespace mgpu
{
// Stub class for modern gpu
struct standard_context_t
{
standard_context_t(bool init)
{}
};
}
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment