[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    explicitly skipping visibility check
From:       "Ariya Hidayat" <ariya () kde ! org>
Date:       2007-05-09 11:13:32
Message-ID: ba035dd10705090413t7e6c8e5xdeb5452efca0c3bb () mail ! gmail ! com
[Download RAW message or body]

Tell me if this is completely wrong.

I was trying to build strigi (+kdelibs) and hit by "unknown reference"
errors. I suspect it's about gcc's visibility. Perhaps I'm on
compiler/distro combination for which the visibility support is
broken, and it was not detected by the cmake macro.

The following patch makes it easy to disable gcc visibility check,
just by putting -DSKIP_VISIBILITY_CHECK in the cmakekde function. It
has minimal impact when doing everything as usual.


Index: MacroCheckGccVisibility.cmake
===================================================================
--- MacroCheckGccVisibility.cmake       (revision 662842)
+++ MacroCheckGccVisibility.cmake       (working copy)
@@ -6,6 +6,9 @@
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.

 macro(MACRO_CHECK_GCC_VISIBILITY GccVisibility)
+  if (SKIP_VISIBILITY_CHECK)
+    message( "Skipping visibility check... " )
+  else (SKIP_VISIBILITY_CHECK)
   if (CMAKE_COMPILER_IS_GNUCXX)
    include(CheckCXXCompilerFlag)
    include(MacroEnsureVersion)
@@ -44,4 +47,5 @@
   else (CMAKE_COMPILER_IS_GNUCXX)
     set(${GccVisibility} FALSE)
   endif (CMAKE_COMPILER_IS_GNUCXX)
+  endif (SKIP_VISIBILITY_CHECK)
 endmacro(MACRO_CHECK_GCC_VISIBILITY)
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic