cmake: Correctly detect support for __bounded__ attribute

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit 4104d2fb91)
This commit is contained in:
Andreas Schneider
2018-08-16 17:45:56 +02:00
parent 24de1fbde8
commit 0cad2778b4

View File

@@ -354,9 +354,6 @@ int main(void) {
return 0; return 0;
}" HAVE_COMPILER__FUNCTION__) }" HAVE_COMPILER__FUNCTION__)
# Stop treating warnings as errors
unset(CMAKE_REQUIRED_FLAGS)
check_c_source_compiles(" check_c_source_compiles("
#define ARRAY_LEN 16 #define ARRAY_LEN 16
void test_attr(const unsigned char *k) void test_attr(const unsigned char *k)
@@ -366,6 +363,9 @@ int main(void) {
return 0; return 0;
}" HAVE_GCC_BOUNDED_ATTRIBUTE) }" HAVE_GCC_BOUNDED_ATTRIBUTE)
# Stop treating warnings as errors
unset(CMAKE_REQUIRED_FLAGS)
if (WITH_DEBUG_CRYPTO) if (WITH_DEBUG_CRYPTO)
set(DEBUG_CRYPTO 1) set(DEBUG_CRYPTO 1)
endif (WITH_DEBUG_CRYPTO) endif (WITH_DEBUG_CRYPTO)