Skip to content
Snippets Groups Projects
Commit 1cc844a6 authored by Martin Killenberg's avatar Martin Killenberg
Browse files

renamed flag USE_TSAN to ENABLE_TSAN

parent 2fb63a95
No related branches found
No related tags found
No related merge requests found
......@@ -25,9 +25,9 @@
#
#######################################################################################################################
string(TOUPPER "${USE_TSAN}" use_tsanitizer_uppercase)
IF(use_tsanitizer_uppercase STREQUAL "TRUE")
message(WARNING "The USE_TSAN set to true. Code coverage cannot be enabled, becasue it requires -O0 flag and USE_TSAN requires -O1.")
string(TOUPPER "${ENABLE_TSAN}" enable_tsanitizer_uppercase)
IF(enable_tsanitizer_uppercase STREQUAL "TRUE")
message(WARNING "The ENABLE_TSAN set to true. Code coverage cannot be enabled, becasue it requires -O0 flag and ENABLE_TSAN requires -O1.")
ELSE()
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 --coverage")
# The make coverage command is only available in debug mode. Also
......
......@@ -29,8 +29,8 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${${PROJECT_NAME}_C_FLAGS} -Wall -Wextra -Ws
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -O3 -g")
string(TOUPPER "${USE_TSAN}" use_tsanitizer_uppercase)
IF(use_tsanitizer_uppercase STREQUAL "TRUE")
string(TOUPPER "${ENABLE_TSAN}" enable_tsanitizer_uppercase)
IF(enable_tsanitizer_uppercase STREQUAL "TRUE")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -O1 -fsanitize=thread")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -O1 -fsanitize=thread")
ELSE()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment