mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-07-31 00:03:07 +03:00
cmake: Use -fprofile-update=atomic to avoid coverage files corruption from threads
The gcc should be able to select this automatically based on the presence of -pthread is present on the commandline, but given that we link the tests static, we do not have this? Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@ -164,7 +164,7 @@ foreach(LANG ${LANGUAGES})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
set(COVERAGE_COMPILER_FLAGS "-g --coverage"
|
||||
set(COVERAGE_COMPILER_FLAGS "-g --coverage -fprofile-update=atomic"
|
||||
CACHE INTERNAL "")
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
|
||||
|
Reference in New Issue
Block a user