From: Matthew Barr Date: Mon, 12 Dec 2016 03:52:06 +0000 (+1100) Subject: Don't ignore unused attrib warnings in test X-Git-Tag: v4.4.0^2~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5754709dd51b93526444b4ea8122bec58c420514;p=thirdparty%2Fvectorscan.git Don't ignore unused attrib warnings in test --- diff --git a/cmake/attrib.cmake b/cmake/attrib.cmake index 6ce3f2a7..5600ce6b 100644 --- a/cmake/attrib.cmake +++ b/cmake/attrib.cmake @@ -1,3 +1,13 @@ # tests for compiler properties -CHECK_C_SOURCE_COMPILES("int foo(int) __attribute__ ((ifunc(\"foo_i\"))); int f1(int i) { return i; } void (*foo_i()) { return f1; } int main(void) { return 0; }" HAS_C_ATTR_IFUNC) +# set -Werror so we can't ignore unused attribute warnings +set (CMAKE_REQUIRED_FLAGS "-Werror") + +CHECK_C_SOURCE_COMPILES(" + int foo(int) __attribute__ ((ifunc(\"foo_i\"))); + int f1(int i) { return i; } + void (*foo_i()) { return f1; } + int main(void) { return 0; } + " HAS_C_ATTR_IFUNC) + +unset(CMAKE_REQUIRED_FLAGS)