Changeset 6048


Ignore:
Timestamp:
May 17, 2018, 3:50:06 PM (3 months ago)
Author:
nmedfort
Message:

Added USE_ADDRESS_SANITIZER compilation flag

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/CMakeLists.txt

    r6047 r6048  
    1111option(DISABLE_DUAL_ABI "Disable GCC Dual ABI support" OFF)
    1212option(CARRYPACK_MANAGER "Use CarryPack Manager to reduce space required for carries. For testing only." OFF)
     13option(USE_ADDRESS_SANITIZER "Enables use of address sanitizer in debug mode if available" OFF)
    1314find_package(LLVM REQUIRED CONFIG)
    1415
     
    238239
    239240UNSET(HAS_ADDRESS_SANITIZER)
     241IF (USE_ADDRESS_SANITIZER)
    240242CHECK_INCLUDE_FILE_CXX("sanitizer/asan_interface.h" HAS_ADDRESS_SANITIZER)
    241243IF (HAS_ADDRESS_SANITIZER)
    242244SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DHAS_ADDRESS_SANITIZER -fsanitize=address")
    243245ENDIF()
    244 
     246ENDIF()
    245247
    246248add_test(
Note: See TracChangeset for help on using the changeset viewer.