Skip to content

Commit 27ca7a0

Browse files
committed
CMake shorten SIMSYCL_CHECK_MODE options
1 parent f0cb9d1 commit 27ca7a0

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ check_type_size(_Float16 FLOAT16 BUILTIN_TYPES_ONLY LANGUAGE CXX)
6464
set (SIMSYCL_FEATURE_HALF_TYPE ${HAVE_FLOAT16})
6565

6666
option(SIMSYCL_ANNOTATE_SYCL_DEPRECATIONS "Wether to annotate deprecated SYCL APIs with [[deprecated]]" ON)
67-
set(SIMSYCL_ENABLE_ASAN OFF CACHE BOOL "Whether to enable address sanitizer")
68-
set(SIMSYCL_CHECK_MODE "SIMSYCL_CHECK_ABORT" CACHE STRING "Check mode to use")
67+
option(SIMSYCL_ENABLE_ASAN "Whether to enable address sanitizer" OFF)
68+
set(SIMSYCL_CHECK_MODE "ABORT" CACHE STRING "Runtime assertion handling NONE|LOG|THROW|ABORT")
6969

7070
set(CONFIG_PATH "${CMAKE_CURRENT_BINARY_DIR}/include/simsycl/config.hh")
7171
configure_file(

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ These can be set on the CMake command line via `-DOPTION=VALUE`.
4141
|---|---|---|
4242
| `SIMSYCL_ANNOTATE_SYCL_DEPRECATIONS` | `OFF`,`ON` | Mark deprecated SYCL APIs with `[[deprecated]]` (default `ON`) |
4343
| `SIMSYCL_ENABLE_ASAN`| `OFF`,`ON` | Build SimSYCL and the user code with AddressSanitizer (default `OFF`) |
44-
| `SIMSYCL_CHECK_MODE` | `SIMSYCL_CHECK_{NONE,LOG,THROW,ABORT}` | How to report verification errors (default `ABORT`) |
44+
| `SIMSYCL_CHECK_MODE` | `NONE`,`LOG`,`THROW`,`ABORT` | How to report verification errors (default `ABORT`) |
4545

4646
## Using SimSYCL
4747

include/simsycl/config.hh.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
#cmakedefine01 SIMSYCL_FEATURE_HALF_TYPE
1010

1111
#ifndef SIMSYCL_CHECK_MODE
12-
#define SIMSYCL_CHECK_MODE @SIMSYCL_CHECK_MODE@
12+
#define SIMSYCL_CHECK_MODE SIMSYCL_CHECK_@SIMSYCL_CHECK_MODE@
1313
#endif

0 commit comments

Comments
 (0)