From f87c4d53adcd6a633ff66f57bb7190de3fbd46d3 Mon Sep 17 00:00:00 2001 From: Anastasios Doumoulakis Date: Mon, 21 Aug 2017 16:30:12 +0100 Subject: [PATCH] Remove BUILD_OPENCL from build process, remplaced by TRISYCL_OPENCL --- Dockerfile | 2 +- doc/cmake.rst | 5 +++-- tests/buffer/CMakeLists.txt | 4 ++-- tests/device/CMakeLists.txt | 4 ++-- tests/device_selector/CMakeLists.txt | 4 ++-- tests/kernel/CMakeLists.txt | 4 ++-- tests/math/CMakeLists.txt | 4 ++-- tests/platform/CMakeLists.txt | 4 ++-- tests/queue/CMakeLists.txt | 4 ++-- 9 files changed, 18 insertions(+), 17 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8095fc55e..2e05553bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,7 +35,7 @@ RUN if [ "${opencl}" = 'ON' ]; then apt-get install -y --allow-downgrades \ RUN git clone https://github.com/${git_slug}.git -b ${git_branch} /trisycl -RUN cd /trisycl; cmake . -DBUILD_OPENCL=${opencl} \ +RUN cd /trisycl; cmake . -DTRISYCL_OPENCL=${opencl} \ -DTRISYCL_OPENMP=${openmp} -DCMAKE_C_COMPILER=${c_compiler} \ -DCMAKE_CXX_COMPILER=${cxx_compiler} && make -j 4 diff --git a/doc/cmake.rst b/doc/cmake.rst index 4fec327eb..ea5847b19 100644 --- a/doc/cmake.rst +++ b/doc/cmake.rst @@ -18,11 +18,12 @@ start off as: # Behavioural options for the solution # option(TRISYCL_OPENMP "triSYCL multi-threading with OpenMP" ON) + option(TRISYCL_OPENCL "triSYCL OpenCL interoperability mode" OFF) option(TRISYCL_NO_ASYNC "triSYCL use synchronous kernel execution" OFF) - option(BUILD_OPENCL "triSYCL build OpenCL tests" ON) - option(BUILD_XILINX "triSYCL build Xilinx-specific tests" OFF) option(TRISYCL_DEBUG "triSCYL use debug mode" OFF) option(TRISYCL_DEBUG_STRUCTORS "triSYCL trace of object lifetimes" OFF) + option(TRISYCL_TRACE_KERNEL "triSYCL trace of kernel execution" OFF) + set(CL_SYCL_LANGUAGE_VERSION 220 CACHE VERSION "Host language version to be used by trisYCL (default is: 220)") set(TRISYCL_CL_LANGUAGE_VERSION 220 CACHE VERSION "Device language version to be used by trisYCL (default is: 220) (not used yet)") diff --git a/tests/buffer/CMakeLists.txt b/tests/buffer/CMakeLists.txt index 1d7bbb872..f3c385937 100644 --- a/tests/buffer/CMakeLists.txt +++ b/tests/buffer/CMakeLists.txt @@ -38,10 +38,10 @@ buffer \"a\" use_count\\(\\) is: 20 buffer \"z\" use_count\\(\\) is: 20 buffer \"z\" is read_only: 0") declare_trisycl_test(TARGET uninitialized_buffer) -if(${BUILD_OPENCL}) +if(${TRISYCL_OPENCL}) declare_trisycl_test(TARGET buffer_data_tracking USES_OPENCL TEST_REGEX " 0 0 0 3 4 5 1 1 1") -endif(${BUILD_OPENCL}) +endif(${TRISYCL_OPENCL}) declare_trisycl_test(TARGET buffer_write_order) diff --git a/tests/device/CMakeLists.txt b/tests/device/CMakeLists.txt index 3a6b26b1f..8f151e2d4 100644 --- a/tests/device/CMakeLists.txt +++ b/tests/device/CMakeLists.txt @@ -4,6 +4,6 @@ project (device) # The name of our project declare_trisycl_test(TARGET default_device) declare_trisycl_test(TARGET get_info) declare_trisycl_test(TARGET type) -if(${BUILD_OPENCL}) +if(${TRISYCL_OPENCL}) declare_trisycl_test(TARGET opencl_device USES_OPENCL) -endif(${BUILD_OPENCL}) +endif(${TRISYCL_OPENCL}) diff --git a/tests/device_selector/CMakeLists.txt b/tests/device_selector/CMakeLists.txt index 36d1063be..1f4feb866 100644 --- a/tests/device_selector/CMakeLists.txt +++ b/tests/device_selector/CMakeLists.txt @@ -3,6 +3,6 @@ project (device_selector) # The name of our project declare_trisycl_test(TARGET explicit_selector) declare_trisycl_test(TARGET selector) -if(${BUILD_OPENCL}) +if(${TRISYCL_OPENCL}) declare_trisycl_test(TARGET opencl_selector USES_OPENCL) -endif(${BUILD_OPENCL}) +endif(${TRISYCL_OPENCL}) diff --git a/tests/kernel/CMakeLists.txt b/tests/kernel/CMakeLists.txt index 6ca018a05..bd705626f 100644 --- a/tests/kernel/CMakeLists.txt +++ b/tests/kernel/CMakeLists.txt @@ -3,7 +3,7 @@ project (kernel) # The name of our project declare_trisycl_test(TARGET functor_item) declare_trisycl_test(TARGET functor) -if(${BUILD_OPENCL}) +if(${TRISYCL_OPENCL}) declare_trisycl_test(TARGET opencl_kernel_empty_set_args USES_OPENCL) declare_trisycl_test(TARGET opencl_kernel_empty USES_OPENCL) declare_trisycl_test(TARGET opencl_kernel_single_task_vector_add_args_42 USES_OPENCL) @@ -11,4 +11,4 @@ if(${BUILD_OPENCL}) declare_trisycl_test(TARGET opencl_kernel_vector_add_args USES_OPENCL TEST_REGEX "6 8 11") declare_trisycl_test(TARGET opencl_kernel_vector_add USES_OPENCL TEST_REGEX "6 8 11") declare_trisycl_test(TARGET opencl_kernel USES_OPENCL) -endif(${BUILD_OPENCL}) +endif(${TRISYCL_OPENCL}) diff --git a/tests/math/CMakeLists.txt b/tests/math/CMakeLists.txt index d27570941..c7057ff53 100644 --- a/tests/math/CMakeLists.txt +++ b/tests/math/CMakeLists.txt @@ -2,6 +2,6 @@ cmake_minimum_required (VERSION 3.0) # The minimum version of CMake necessary to project (math) # The name of our project declare_trisycl_test(TARGET math) -if(${BUILD_OPENCL}) +if(${TRISYCL_OPENCL}) declare_trisycl_test(TARGET opencl_type USES_OPENCL TEST_REGEX "x: 0, y: 1, z: 2") -endif(${BUILD_OPENCL}) +endif(${TRISYCL_OPENCL}) diff --git a/tests/platform/CMakeLists.txt b/tests/platform/CMakeLists.txt index 49b0c39c8..9137d2e7f 100644 --- a/tests/platform/CMakeLists.txt +++ b/tests/platform/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required (VERSION 3.0) # The minimum version of CMake necessary to project (platform) # The name of our project declare_trisycl_test(TARGET default_platform) -if(${BUILD_OPENCL}) +if(${TRISYCL_OPENCL}) declare_trisycl_test(TARGET opencl_platform USES_OPENCL) -endif(${BUILD_OPENCL}) +endif(${TRISYCL_OPENCL}) declare_trisycl_test(TARGET get_devices) diff --git a/tests/queue/CMakeLists.txt b/tests/queue/CMakeLists.txt index 7cf540dc3..d95cdbbf2 100644 --- a/tests/queue/CMakeLists.txt +++ b/tests/queue/CMakeLists.txt @@ -7,7 +7,7 @@ declare_trisycl_test(TARGET queue) declare_trisycl_test(TARGET wait TEST_REGEX "First Second") -if(${BUILD_OPENCL}) +if(${TRISYCL_OPENCL}) declare_trisycl_test(TARGET opencl_queue USES_OPENCL) -endif(${BUILD_OPENCL}) +endif(${TRISYCL_OPENCL}) declare_trisycl_test(TARGET double_wait)