summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJonathan Müller <git@foonathan.net>2019-03-18 12:22:15 +0100
committerJonathan Müller <git@foonathan.net>2019-03-18 12:22:15 +0100
commitabf3a7a47d45ddad2a1bd69b176a4c471f65231d (patch)
tree5f9946593e83a68eea0a5b06a8f36215e917ddec /src
parent11043696474263edbd508b98076933b81ad32805 (diff)
Remove deprecated call to add_compiler_export_flags()
It is deprecated in CMake 3.0, the replacement is to set the CXX_VISIBILITY_PRESET (or in our case C_VISIBILITY_PRESET) and VISIBILITY_INLINES_HIDDEN properties of the target. We're already setting them by setting the CMake variables anyway, so the call can be removed.
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 468b0f0..10fcb1d 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -59,7 +59,6 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmark_version.h.in
include (GenerateExportHeader)
add_executable(${PROGRAM} ${PROGRAM_SOURCES})
-add_compiler_export_flags()
# Disable the PUBLIC declarations when compiling the executable:
set_target_properties(${PROGRAM} PROPERTIES
@@ -72,12 +71,9 @@ set(CMAKE_LINKER_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG}")
set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE} -pg")
set(CMAKE_LINKER_PROFILE "${CMAKE_LINKER_FLAGS_RELEASE} -pg")
-if (${CMAKE_VERSION} VERSION_GREATER "1.8")
- set(CMAKE_C_VISIBILITY_PRESET hidden)
- set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
-elseif(CMAKE_COMPILER_IS_GNUCC OR ${CMAKE_C_COMPILER_ID} STREQUAL "Clang")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
-endif ()
+# -fvisibility=hidden
+set(CMAKE_C_VISIBILITY_PRESET hidden)
+set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
if (CMARK_SHARED)
add_library(${LIBRARY} SHARED ${LIBRARY_SOURCES})