Add support for clang's ThreadSafetyAnalysis

This commit is contained in:
seelabs
2022-06-01 15:06:48 -04:00
committed by Nik Bougalis
parent e46d2bcf27
commit f55913dcee
3 changed files with 70 additions and 0 deletions

View File

@@ -21,6 +21,12 @@ if(Git_FOUND)
endif()
endif() #git
if (thread_safety_analysis)
add_compile_options(-Wthread-safety -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -DRIPPLE_ENABLE_THREAD_SAFETY_ANNOTATIONS)
add_compile_options("-stdlib=libc++")
add_link_options("-stdlib=libc++")
endif()
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/Builds/CMake")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/Builds/CMake/deps")