summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-11-14 15:25:31 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2014-11-14 15:25:31 -0800
commit38710f1de71e9bb22b3c602dd05fb558092e1fb1 (patch)
tree9d4c67f9c959e13c554765fa28f88e25927cd25f /src
parent1524531c0f0aa529e7ba6096bbeeabee6edd1344 (diff)
Disable PUBLIC declarations when we're compiling the executable.
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 75d41c0..b81146b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -57,6 +57,10 @@ include (GenerateExportHeader)
add_executable(${PROGRAM} ${PROGRAM_SOURCES})
add_compiler_export_flags()
+# Disable the PUBLIC declarations when compiling the executable:
+set_target_properties(${PROGRAM} PROPERTIES
+ COMPILE_FLAGS -DCMARK_STATIC_DEFINE)
+
set(CMAKE_C_VISIBILITY_PRESET hidden)
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
add_library(${LIBRARY} SHARED ${LIBRARY_SOURCES})