cmake: Fix -Wattributes check in ConfigureChecks.cmake
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Этот коммит содержится в:
родитель
1d33a4424d
Коммит
f65c00f39d
@ -276,19 +276,19 @@ int main(void) {
|
|||||||
###########################################################
|
###########################################################
|
||||||
# For detecting attributes we need to treat warnings as
|
# For detecting attributes we need to treat warnings as
|
||||||
# errors
|
# errors
|
||||||
if (UNIX)
|
if (UNIX OR MINGW)
|
||||||
# Get warnings for attributs
|
# Get warnings for attributs
|
||||||
check_c_compiler_flag("-Wattributs" REQUIRED_FLAGS_WERROR)
|
check_c_compiler_flag("-Wattributes" REQUIRED_FLAGS_WERROR)
|
||||||
if (REQUIRED_FLAGS_WERROR)
|
if (REQUIRED_FLAGS_WERROR)
|
||||||
set(CMAKE_REQUIRED_FLAGS "-Wattributes")
|
string(APPEND CMAKE_REQUIRED_FLAGS "-Wattributes ")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Turn warnings into errors
|
# Turn warnings into errors
|
||||||
check_c_compiler_flag("-Werror" REQUIRED_FLAGS_WERROR)
|
check_c_compiler_flag("-Werror" REQUIRED_FLAGS_WERROR)
|
||||||
if (REQUIRED_FLAGS_WERROR)
|
if (REQUIRED_FLAGS_WERROR)
|
||||||
set(CMAKE_REQUIRED_FLAGS "-Werror")
|
string(APPEND CMAKE_REQUIRED_FLAGS "-Werror ")
|
||||||
endif()
|
endif()
|
||||||
endif (UNIX)
|
endif ()
|
||||||
|
|
||||||
check_c_source_compiles("
|
check_c_source_compiles("
|
||||||
void test_constructor_attribute(void) __attribute__ ((constructor));
|
void test_constructor_attribute(void) __attribute__ ((constructor));
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user