From 837c9ef288bda94bd56953b9a4d5fffc6c8c10b4 Mon Sep 17 00:00:00 2001 From: Graham Perks Date: Fri, 9 Sep 2011 10:17:54 -0500 Subject: [PATCH] Add cmake option for visibility=hidden --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 44980f85..0c0c9097 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,11 @@ else() endif() OPTION(ENABLE_STATIC_RUNTIME "Visual Studio, link with runtime statically" OFF) +option(VISIBILITY_HIDDEN "Build with -fvisibility=hidden" OFF) +if(VISIBILITY_HIDDEN) + add_definitions (-fvisibility=hidden) +endif() + option(BUILD_TESTS "Build the test suite" OFF) option(BUILD_EXAMPLES "Build the examples" OFF)