1
1

cmake: Add -Wattributs for configure checks

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Этот коммит содержится в:
Andreas Schneider 2018-09-25 14:35:30 +02:00
родитель 9c37c8c5a5
Коммит 1d7520b68a

Просмотреть файл

@ -273,6 +273,13 @@ int main(void) {
# For detecting attributes we need to treat warnings as
# errors
if (UNIX)
# Get warnings for attributs
check_c_compiler_flag("-Wattributs" REQUIRED_FLAGS_WERROR)
if (REQUIRED_FLAGS_WERROR)
set(CMAKE_REQUIRED_FLAGS "-Wattributes")
endif()
# Turn warnings into errors
check_c_compiler_flag("-Werror" REQUIRED_FLAGS_WERROR)
if (REQUIRED_FLAGS_WERROR)
set(CMAKE_REQUIRED_FLAGS "-Werror")