1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-31 00:03:07 +03:00

cmake: Only set -Werror on UNIX

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Andreas Schneider
2018-08-13 20:17:00 +02:00
parent 0656f8a43d
commit 6aa9392699

View File

@ -270,7 +270,9 @@ int main(void) {
###########################################################
# For detecting attributes we need to treat warnings as
# errors
set(CMAKE_REQUIRED_FLAGS "-Werror")
if (UNIX)
set(CMAKE_REQUIRED_FLAGS "-Werror")
endif (UNIX)
check_c_source_compiles("
void test_constructor_attribute(void) __attribute__ ((constructor));