Skip to content

Commit

Permalink
CMake shorten SIMSYCL_CHECK_MODE options
Browse files Browse the repository at this point in the history
  • Loading branch information
fknorr committed Jan 8, 2025
1 parent 39368b9 commit 7670e8d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ check_type_size(_Float16 FLOAT16 BUILTIN_TYPES_ONLY LANGUAGE CXX)
set (SIMSYCL_FEATURE_HALF_TYPE ${HAVE_FLOAT16})

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

set(CONFIG_PATH "${CMAKE_CURRENT_BINARY_DIR}/include/simsycl/config.hh")
configure_file(
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ These can be set on the CMake command line via `-DOPTION=VALUE`.
|---|---|---|
| `SIMSYCL_ANNOTATE_SYCL_DEPRECATIONS` | `OFF`,`ON` | Mark deprecated SYCL APIs with `[[deprecated]]` (default `ON`) |
| `SIMSYCL_ENABLE_ASAN`| `OFF`,`ON` | Build SimSYCL and the user code with AddressSanitizer (default `OFF`) |
| `SIMSYCL_CHECK_MODE` | `SIMSYCL_CHECK_{NONE,LOG,THROW,ABORT}` | How to report verification errors (default `ABORT`) |
| `SIMSYCL_CHECK_MODE` | `NONE`,`LOG`,`THROW`,`ABORT` | How to report verification errors (default `ABORT`) |

## Using SimSYCL

Expand Down
2 changes: 1 addition & 1 deletion include/simsycl/config.hh.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
#cmakedefine01 SIMSYCL_FEATURE_HALF_TYPE

#ifndef SIMSYCL_CHECK_MODE
#define SIMSYCL_CHECK_MODE @SIMSYCL_CHECK_MODE@
#define SIMSYCL_CHECK_MODE SIMSYCL_CHECK_@SIMSYCL_CHECK_MODE@
#endif

0 comments on commit 7670e8d

Please sign in to comment.