summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2014-10-23 07:23:36 +0200
committerAndreas Schneider <asn@samba.org>2014-10-24 14:52:29 +0200
commitf0606cf44ac93c2105296d608f5e88ec0a9ba3c9 (patch)
tree6d64f96ab2e6c37b87713698223075adec3b42c3
parentdb8edc87e6a1a771336d832a6da02c4760c74100 (diff)
downloadsocket_wrapper-f0606cf44ac93c2105296d608f5e88ec0a9ba3c9.tar.gz
socket_wrapper-f0606cf44ac93c2105296d608f5e88ec0a9ba3c9.tar.xz
socket_wrapper-f0606cf44ac93c2105296d608f5e88ec0a9ba3c9.zip
cmake: Treat no_sanitize_address attribute warnings as error.
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
-rw-r--r--ConfigureChecks.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 32cd9bb..71e5056 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -194,6 +194,8 @@ int main(void) {
return 0;
}" HAVE_FUNCTION_ATTRIBUTE_FORMAT)
+# If this produces a warning treat it as error!
+set(CMAKE_REQUIRED_FLAGS "-Werror")
check_c_source_compiles("
void test_address_sanitizer_attribute(void) __attribute__((no_sanitize_address));
@@ -205,6 +207,7 @@ void test_address_sanitizer_attribute(void)
int main(void) {
return 0;
}" HAVE_ADDRESS_SANITIZER_ATTRIBUTE)
+set(CMAKE_REQUIRED_FLAGS)
check_library_exists(dl dlopen "" HAVE_LIBDL)
if (HAVE_LIBDL)