From f101b875118137ff4fe09596dc8c2ec25194f207 Mon Sep 17 00:00:00 2001 From: "Larsen, Steffen" Date: Tue, 1 Aug 2023 05:10:29 -0700 Subject: [PATCH 1/2] Add SYCL_CTS_ENABLE_EXT_ONEAPI_TESTS CMake option This commit adds the SYCL_CTS_ENABLE_EXT_ONEAPI_TESTS as a shortcut for enabling all oneapi extension tests. It will only overwrite the other options if turned ON. In the OFF state the option has no effect. Signed-off-by: Larsen, Steffen --- CMakeLists.txt | 34 +++++++++++++++++++++++----------- cmake/AddCTSOption.cmake | 8 +++++++- 2 files changed, 30 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e8ab56366..1036dd8d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,37 +35,49 @@ add_cts_option(SYCL_CTS_ENABLE_FULL_CONFORMANCE "Enable full conformance with extensive tests" OFF WARN_IF_OFF "Full conformance mode (SYCL_CTS_ENABLE_FULL_CONFORMANCE) should be used for conformance submission") -add_cts_option(SYCL_CTS_ENABLE_EXT_ONEAPI_PROPERTIES_TESTS - "Enable extension oneAPI compile-time property list tests" OFF) - # TODO: Should SYCL_CTS_ENABLE_FULL_CONFORMANCE=ON imply this? add_cts_option(SYCL_CTS_ENABLE_DEPRECATED_FEATURES_TESTS "Enable tests for deprecated SYCL features" ON WARN_IF_OFF "Tests for deprecated SYCL features should be enabled for conformance submission") +add_cts_option(SYCL_CTS_ENABLE_EXT_ONEAPI_TESTS + "Enable all extension oneAPI tests" OFF) + +add_cts_option(SYCL_CTS_ENABLE_EXT_ONEAPI_PROPERTIES_TESTS + "Enable extension oneAPI compile-time property list tests" OFF + FORCE_ON ${SYCL_CTS_ENABLE_EXT_ONEAPI_TESTS}) + add_cts_option(SYCL_CTS_ENABLE_EXT_ONEAPI_SUB_GROUP_MASK_TESTS - "Enable extension oneAPI sub_group_mask tests" OFF) + "Enable extension oneAPI sub_group_mask tests" OFF + FORCE_ON ${SYCL_CTS_ENABLE_EXT_ONEAPI_TESTS}) add_cts_option(SYCL_CTS_ENABLE_EXT_ONEAPI_DEVICE_GLOBAL_TESTS - "Enable extension oneAPI device_global tests" OFF) + "Enable extension oneAPI device_global tests" OFF + FORCE_ON ${SYCL_CTS_ENABLE_EXT_ONEAPI_TESTS}) add_cts_option(SYCL_CTS_ENABLE_EXT_ONEAPI_MEMCPY2D_TESTS - "Enable extension oneAPI memcpy2d tests" OFF) + "Enable extension oneAPI memcpy2d tests" OFF + FORCE_ON ${SYCL_CTS_ENABLE_EXT_ONEAPI_TESTS}) add_cts_option(SYCL_CTS_ENABLE_EXT_ONEAPI_ENQUEUE_BARRIER_TESTS - "Enable extension oneAPI enqueue_barrier tests" OFF) + "Enable extension oneAPI enqueue_barrier tests" OFF + FORCE_ON ${SYCL_CTS_ENABLE_EXT_ONEAPI_TESTS}) add_cts_option(SYCL_CTS_ENABLE_EXT_ONEAPI_WEAK_OBJECT_TESTS - "Enable extension oneAPI weak_object tests" OFF) + "Enable extension oneAPI weak_object tests" OFF + FORCE_ON ${SYCL_CTS_ENABLE_EXT_ONEAPI_TESTS}) add_cts_option(SYCL_CTS_ENABLE_EXT_ONEAPI_QUEUE_EMPTY - "Enable extension oneAPI queue_empty tests" OFF) + "Enable extension oneAPI queue_empty tests" OFF + FORCE_ON ${SYCL_CTS_ENABLE_EXT_ONEAPI_TESTS}) add_cts_option(SYCL_CTS_ENABLE_EXT_ONEAPI_DISCARD_QUEUE_EVENTS_TESTS - "Enable extension oneAPI discard_queue_events tests" OFF) + "Enable extension oneAPI discard_queue_events tests" OFF + FORCE_ON ${SYCL_CTS_ENABLE_EXT_ONEAPI_TESTS}) add_cts_option(SYCL_CTS_ENABLE_EXT_ONEAPI_BFLOAT16_TESTS - "Enable extension oneAPI bfloat16 tests" OFF) + "Enable extension oneAPI bfloat16 tests" OFF + FORCE_ON ${SYCL_CTS_ENABLE_EXT_ONEAPI_TESTS}) # TODO: Deprecated - remove add_cts_option(SYCL_CTS_ENABLE_VERBOSE_LOG diff --git a/cmake/AddCTSOption.cmake b/cmake/AddCTSOption.cmake index 39a007c0b..4d83ef8cc 100644 --- a/cmake/AddCTSOption.cmake +++ b/cmake/AddCTSOption.cmake @@ -11,10 +11,12 @@ set(SYCL_CTS_DETAIL_OPTION_COMPILE_DEFINITIONS "") # Use `#if