Add AddressSanitizer option to CMake
parent
c202d43d8f
commit
4652b66bb5
|
@ -82,6 +82,10 @@ OPTION ( ASSIMP_WERROR
|
||||||
"Treat warnings as errors."
|
"Treat warnings as errors."
|
||||||
OFF
|
OFF
|
||||||
)
|
)
|
||||||
|
OPTION ( ASSIMP_ASAN
|
||||||
|
"Enable AddressSanitizer."
|
||||||
|
OFF
|
||||||
|
)
|
||||||
OPTION ( SYSTEM_IRRXML
|
OPTION ( SYSTEM_IRRXML
|
||||||
"Use system installed Irrlicht/IrrXML library."
|
"Use system installed Irrlicht/IrrXML library."
|
||||||
OFF
|
OFF
|
||||||
|
@ -223,6 +227,11 @@ if (ASSIMP_WERROR)
|
||||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (ASSIMP_ASAN)
|
||||||
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
|
||||||
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address")
|
||||||
|
endif()
|
||||||
|
|
||||||
INCLUDE (FindPkgMacros)
|
INCLUDE (FindPkgMacros)
|
||||||
INCLUDE (PrecompiledHeader)
|
INCLUDE (PrecompiledHeader)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue