Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,25 @@ option(SOLTRACE_BUILD_EMBREE_SUPPORT "Build Embree support for ray tracing" OFF)
option(SOLTRACE_BUILD_OPTIX_SUPPORT "Build the OptiX support for ray tracing" OFF)

option(SOLTRACE_BUILD_PERF_TEST "Build performance tests (not built for debug)" OFF)
option(SOLTRACE_ENABLE_ASAN "Enable AddressSanitizer for supported builds" OFF)

option(FULL_FIELD_VALIDATION_TEST "Include full field validation tests" OFF)

if(SOLTRACE_ENABLE_ASAN)
if(MSVC)
message(WARNING "SOLTRACE_ENABLE_ASAN is not yet supported with MSVC or GCC")
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang")
message(STATUS "Enabling address sanitizer")
add_compile_options(
$<$<COMPILE_LANGUAGE:C,CXX>:-fsanitize=address>
$<$<COMPILE_LANGUAGE:C,CXX>:-fno-omit-frame-pointer>
)
add_link_options(-fsanitize=address)
else()
message(WARNING "SOLTRACE_ENABLE_ASAN is only supported with Clang")
endif()
endif()


enable_testing()

Expand All @@ -29,4 +45,3 @@ add_subdirectory(google-tests)
if(SOLTRACE_BUILD_GUI)
add_subdirectory(app)
endif()