Fix warning message for unusupported -fsanitize-blacklist

This commit is contained in:
Azat Khuzhin 2020-12-15 02:24:50 +03:00
parent 519d89dc9f
commit 8de0c0e8fc

View File

@ -41,9 +41,10 @@ if (SANITIZE)
if (COMPILER_CLANG) if (COMPILER_CLANG)
set (TSAN_FLAGS "${TSAN_FLAGS} -fsanitize-blacklist=${CMAKE_SOURCE_DIR}/tests/tsan_suppressions.txt") set (TSAN_FLAGS "${TSAN_FLAGS} -fsanitize-blacklist=${CMAKE_SOURCE_DIR}/tests/tsan_suppressions.txt")
else() else()
message (WARNING "TSAN suppressions was not passed to the compiler (since the compiler is not clang)") set (MESSAGE "TSAN suppressions was not passed to the compiler (since the compiler is not clang)\n")
message (WARNING "Use the following command to pass them manually:") set (MESSAGE "${MESSAGE}Use the following command to pass them manually:\n")
message (WARNING " export TSAN_OPTIONS=\"$TSAN_OPTIONS suppressions=${CMAKE_SOURCE_DIR}/tests/tsan_suppressions.txt\"") set (MESSAGE "${MESSAGE} export TSAN_OPTIONS=\"$TSAN_OPTIONS suppressions=${CMAKE_SOURCE_DIR}/tests/tsan_suppressions.txt\"")
message (WARNING "${MESSAGE}")
endif() endif()
@ -61,9 +62,10 @@ if (SANITIZE)
if (COMPILER_CLANG) if (COMPILER_CLANG)
set (UBSAN_FLAGS "${UBSAN_FLAGS} -fsanitize-blacklist=${CMAKE_SOURCE_DIR}/tests/ubsan_suppressions.txt") set (UBSAN_FLAGS "${UBSAN_FLAGS} -fsanitize-blacklist=${CMAKE_SOURCE_DIR}/tests/ubsan_suppressions.txt")
else() else()
message (WARNING "UBSAN suppressions was not passed to the compiler (since the compiler is not clang)") set (MESSAGE "UBSAN suppressions was not passed to the compiler (since the compiler is not clang)\n")
message (WARNING "Use the following command to pass them manually:") set (MESSAGE "${MESSAGE}Use the following command to pass them manually:\n")
message (WARNING " export UBSAN_OPTIONS=\"$UBSAN_OPTIONS suppressions=${CMAKE_SOURCE_DIR}/tests/ubsan_suppressions.txt\"") set (MESSAGE "${MESSAGE} export UBSAN_OPTIONS=\"$UBSAN_OPTIONS suppressions=${CMAKE_SOURCE_DIR}/tests/ubsan_suppressions.txt\"")
message (WARNING "${MESSAGE}")
endif() endif()
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SAN_FLAGS} ${UBSAN_FLAGS}") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SAN_FLAGS} ${UBSAN_FLAGS}")