diff options
-rw-r--r-- | ConfigureChecks.cmake | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index a92dcc5f..650119cb 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -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)); |