diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-11-14 15:25:31 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-11-14 15:25:31 -0800 |
commit | 38710f1de71e9bb22b3c602dd05fb558092e1fb1 (patch) | |
tree | 9d4c67f9c959e13c554765fa28f88e25927cd25f | |
parent | 1524531c0f0aa529e7ba6096bbeeabee6edd1344 (diff) |
Disable PUBLIC declarations when we're compiling the executable.
-rw-r--r-- | src/CMakeLists.txt | 4 |
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}) |