visibility unsupported on windows
authorkoda
Mon, 10 Jun 2013 11:05:10 +0200
changeset 9169 ef53201e95ec
parent 9167 ecf19179b37e
child 9170 7c75643d0b66
visibility unsupported on windows
cmake_modules/compilerchecks.cmake
--- a/cmake_modules/compilerchecks.cmake	Mon Jun 10 10:59:49 2013 +0200
+++ b/cmake_modules/compilerchecks.cmake	Mon Jun 10 11:05:10 2013 +0200
@@ -19,9 +19,9 @@
     set(CMAKE_SHARED_LIBRARY_CXX_FLAGS  "${CMAKE_SHARED_LIBRARY_C_FLAGS} -fstack-protector-all -fstack-protector")
 endif()
 
-#symbol visibility
-check_c_compiler_flag("-fvisibility=hidden" HAVE_VISIBILITYH)
-if(HAVE_VISIBILITYH)
+#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)
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
 endif()