Skip to content

Commit

Permalink
[CMake] Add an option to build with asan.
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmichal authored and gganis committed Nov 23, 2021
1 parent 88caa5e commit 95f8806
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmake/XRootDDefaults.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ option( XRDCL_LIB_ONLY "Build only the client libraries and necessary dependen
option( PYPI_BUILD "The project is being built for PyPI release" FALSE )
option( ENABLE_VOMS "Enable VOMS plug-in if possible." TRUE )
option( ENABLE_XRDEC "Enable erasure coding component." FALSE )
option( ENABLE_ASAN "Enable adress sanitizer." FALSE )
define_default( XRD_PYTHON_REQ_VERSION 2.4 )
3 changes: 3 additions & 0 deletions cmake/XRootDOSDefs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ set( LIBRARY_PATH_PREFIX "lib" )
#-------------------------------------------------------------------------------
set(CMAKE_CXX_STANDARD 14)

if( ENABLE_ASAN )
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
endif()

#-------------------------------------------------------------------------------
# Enable XrdCl::Pipelines for clang compiler
Expand Down
2 changes: 2 additions & 0 deletions src/XrdCl/XrdClCheckSumHelper.hh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#include "XrdCl/XrdClConstants.hh"
#include "XrdCks/XrdCksCalc.hh"
#include "XrdCl/XrdClCheckSumManager.hh"
#include "XrdCl/XrdClLog.hh"
#include "XrdCl/XrdClUtils.hh"

#include <string>

Expand Down

0 comments on commit 95f8806

Please sign in to comment.