From 29b20775f758c2a3c9398746e9293b0680b2413f Mon Sep 17 00:00:00 2001 From: Han Fei Date: Tue, 17 Jan 2023 23:06:44 +0100 Subject: [PATCH] not compile gwp in non-linux environment --- CMakeLists.txt | 5 +++++ contrib/gwpasan-cmake/CMakeLists.txt | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ab976612401..8f54b0b2236 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -433,6 +433,11 @@ else() link_libraries(global-group) endif () +option (ENABLE_GWP_ASAN "Enable Gwp-Asan" ON) +if (NOT OS_LINUX AND NOT OS_ANDROID) + set(ENABLE_GWP_ASAN OFF) +endif () + option(WERROR "Enable -Werror compiler option" ON) if (WERROR) diff --git a/contrib/gwpasan-cmake/CMakeLists.txt b/contrib/gwpasan-cmake/CMakeLists.txt index d58a44de4f3..cc88903eecd 100644 --- a/contrib/gwpasan-cmake/CMakeLists.txt +++ b/contrib/gwpasan-cmake/CMakeLists.txt @@ -1,5 +1,3 @@ -option (ENABLE_GWP_ASAN "Enable Gwp-Asan" ${ENABLE_LIBRARIES}) - if (NOT ENABLE_GWP_ASAN) message (STATUS "Not using gwp-asan") return ()