From 8de0c0e8fcf975ce074f0f19032f9ed37c8021bf Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Tue, 15 Dec 2020 02:24:50 +0300 Subject: [PATCH] Fix warning message for unusupported -fsanitize-blacklist --- cmake/sanitize.cmake | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/cmake/sanitize.cmake b/cmake/sanitize.cmake index bbcfa3c3e7a..72bdf27004e 100644 --- a/cmake/sanitize.cmake +++ b/cmake/sanitize.cmake @@ -41,9 +41,10 @@ if (SANITIZE) if (COMPILER_CLANG) set (TSAN_FLAGS "${TSAN_FLAGS} -fsanitize-blacklist=${CMAKE_SOURCE_DIR}/tests/tsan_suppressions.txt") else() - message (WARNING "TSAN suppressions was not passed to the compiler (since the compiler is not clang)") - message (WARNING "Use the following command to pass them manually:") - message (WARNING " export TSAN_OPTIONS=\"$TSAN_OPTIONS suppressions=${CMAKE_SOURCE_DIR}/tests/tsan_suppressions.txt\"") + set (MESSAGE "TSAN suppressions was not passed to the compiler (since the compiler is not clang)\n") + set (MESSAGE "${MESSAGE}Use the following command to pass them manually:\n") + set (MESSAGE "${MESSAGE} export TSAN_OPTIONS=\"$TSAN_OPTIONS suppressions=${CMAKE_SOURCE_DIR}/tests/tsan_suppressions.txt\"") + message (WARNING "${MESSAGE}") endif() @@ -61,9 +62,10 @@ if (SANITIZE) if (COMPILER_CLANG) set (UBSAN_FLAGS "${UBSAN_FLAGS} -fsanitize-blacklist=${CMAKE_SOURCE_DIR}/tests/ubsan_suppressions.txt") else() - message (WARNING "UBSAN suppressions was not passed to the compiler (since the compiler is not clang)") - message (WARNING "Use the following command to pass them manually:") - message (WARNING " export UBSAN_OPTIONS=\"$UBSAN_OPTIONS suppressions=${CMAKE_SOURCE_DIR}/tests/ubsan_suppressions.txt\"") + set (MESSAGE "UBSAN suppressions was not passed to the compiler (since the compiler is not clang)\n") + set (MESSAGE "${MESSAGE}Use the following command to pass them manually:\n") + set (MESSAGE "${MESSAGE} export UBSAN_OPTIONS=\"$UBSAN_OPTIONS suppressions=${CMAKE_SOURCE_DIR}/tests/ubsan_suppressions.txt\"") + message (WARNING "${MESSAGE}") endif() set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SAN_FLAGS} ${UBSAN_FLAGS}")