]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
fix visibility for extras (i hope)
authorrcombs <rcombs@sq18.sfeng.sourcefire.com>
Thu, 4 Dec 2014 05:35:40 +0000 (00:35 -0500)
committerrcombs <rcombs@sq18.sfeng.sourcefire.com>
Thu, 4 Dec 2014 05:35:40 +0000 (00:35 -0500)
extra/CMakeLists.txt

index 6ad44abccc8b18de4a14dcc25425e29a2f0cdbbf..492a1854585308d59c94cec54555cc9f09ab6bcd 100644 (file)
@@ -38,8 +38,15 @@ else (BUILD_EXTRA_PLUGINS)
     message(STATUS "${CMAKE_CXX_FLAGS}")
 
 
-    # Some shared library flags for the two platforms which I am using
     include(CheckCXXCompilerFlag)
+    set (CMAKE_REQUIRED_FLAGS "-fvisibility=hidden")
+    check_cxx_compiler_flag ("" HAVE_VISIBILITY)
+    if (HAVE_VISIBILITY)
+        set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAVE_VISIBILITY")
+    endif ()
+    unset(CMAKE_REQUIRED_FLAGS)
+
+    # Some shared library flags for the two platforms which I am using
     set(CMAKE_REQUIRED_FLAGS "-Wl,-undefined,dynamic_lookup")
     check_cxx_compiler_flag("" HAVE_DYNAMIC_LOOKUP)
     if(HAVE_DYNAMIC_LOOKUP)