cmake_modules/compilerchecks.cmake
changeset 9223 71fc5893071c
parent 9222 a19fa86509c2
child 9225 d8d929f92633
--- a/cmake_modules/compilerchecks.cmake	Thu Jun 13 22:01:41 2013 +0200
+++ b/cmake_modules/compilerchecks.cmake	Thu Jun 13 22:04:22 2013 +0200
@@ -21,9 +21,9 @@
     set(CMAKE_SHARED_LIBRARY_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CXX_FLAGS} -fstack-protector-all -fstack-protector")
 endif()
 
-#symbol visibility, not supported on Windows (so we error out to avoid spam)
-check_c_compiler_flag("-fvisibility=hidden -Werror" HAVE_VISIBILITY)
-if(HAVE_VISIBILITY)
+#symbol visibility, not supported on Windows
+check_c_compiler_flag("-fvisibility=hidden" HAVE_VISIBILITY)
+if(HAVE_VISIBILITY AND (NOT WIN32))
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
 endif()