mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
changed: probe for cl/opencl.hpp and use if found
this to avoid a spam of warnings
This commit is contained in:
parent
903b5462aa
commit
7de50b94c7
@ -202,6 +202,10 @@ if(OpenCL_FOUND)
|
||||
if(CL2_HPP)
|
||||
set(HAVE_OPENCL 1)
|
||||
include_directories(${OpenCL_INCLUDE_DIRS})
|
||||
find_file(OPENCL_HPP CL/opencl.hpp HINTS ${OpenCL_INCLUDE_DIRS})
|
||||
if(OPENCL_HPP)
|
||||
set(HAVE_OPENCL_HPP 1)
|
||||
endif()
|
||||
else()
|
||||
message(WARNING " OpenCL was found, but this version of opm-simulators relies on CL/cl2.hpp, which implements OpenCL 1.0, 1.1 and 1.2.\n Deactivating OpenCL")
|
||||
set(OpenCL_FOUND OFF)
|
||||
|
@ -7,6 +7,7 @@ set (opm-simulators_CONFIG_VAR
|
||||
HAVE_PETSC
|
||||
HAVE_CUDA
|
||||
HAVE_OPENCL
|
||||
HAVE_OPENCL_HPP
|
||||
HAVE_FPGA
|
||||
HAVE_AMGCL
|
||||
HAVE_VEXCL
|
||||
|
@ -17,7 +17,7 @@
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include <config.h>
|
||||
#include <opm/common/OpmLog/OpmLog.hpp>
|
||||
#include <opm/common/ErrorMacros.hpp>
|
||||
#include <dune/common/timer.hh>
|
||||
|
@ -17,6 +17,7 @@
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <opm/simulators/linalg/bda/opencl.hpp>
|
||||
#include <string>
|
||||
|
||||
|
@ -25,7 +25,11 @@
|
||||
#define CL_HPP_TARGET_OPENCL_VERSION 120 // indicate OpenCL 1.2 is used
|
||||
#define CL_HPP_MINIMUM_VERSION 120
|
||||
#define CL_HPP_MINIMUM_OPENCL_VERSION 120
|
||||
#if HAVE_OPENCL_HPP
|
||||
#include <CL/opencl.hpp>
|
||||
#else
|
||||
#include <CL/cl2.hpp> // supports up to OpenCL 1.2
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <opm/simulators/linalg/bda/openclKernels.hpp>
|
||||
|
||||
namespace bda
|
||||
|
Loading…
Reference in New Issue
Block a user