actually tests are there to be tested, just skip the variable assignment on windows
authorkoda
Thu, 13 Jun 2013 22:04:22 +0200
changeset 9223 71fc5893071c
parent 9222 a19fa86509c2
child 9224 bce8cf41d666
actually tests are there to be tested, just skip the variable assignment on windows
cmake_modules/compilerchecks.cmake
--- 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()