cmark

My personal build of CMark ✏️

Commit
845bce401846732431f984907a0472e3f0fd8766
Parent
cfdca3ec23b192c4526752194198291e08f9da80
Author
John MacFarlane <jgm@berkeley.edu>
Date

Move C_VISIBILITY_PRESET back to src/CMakeLists.txt.

This reverts a change by @compnerd in commit b6ffaca93e2b539ec407aeb4fd588c7f9441e7a9. We don't want this for api_tests, as it triggers this warning:

``` CMake Warning (dev) at api_test/CMakeLists.txt:1 (add_executable): Policy CMP0063 is not set: Honor visibility properties for all target types. Run "cmake --help-policy CMP0063" for policy details. Use the cmake_policy command to set the policy and suppress this warning.

Target "api_test" of type "EXECUTABLE" has the following visibility properties set for C:

C_VISIBILITY_PRESET

For compatibility CMake is not honoring them for this target. This warning is for project developers. Use -Wno-dev to suppress it. ```

Diffstat

2 files changed, 4 insertions, 4 deletions

Status File Name N° Changes Insertions Deletions
Modified CMakeLists.txt 4 0 4
Modified src/CMakeLists.txt 4 4 0
diff --git a/CMakeLists.txt b/CMakeLists.txt
@@ -19,10 +19,6 @@ if(NOT MSVC)
   set(CMAKE_C_EXTENSIONS NO)
 endif()
 
-# -fvisibility=hidden
-set(CMAKE_C_VISIBILITY_PRESET hidden)
-set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
-
 set(CMAKE_INCLUDE_CURRENT_DIR ON)
 
 # The Linux modules distributed with CMake add "-rdynamic" to the build flags
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
@@ -62,6 +62,10 @@ elseif (CMARK_SHARED)
   target_link_libraries(${PROGRAM} ${LIBRARY})
 endif()
 
+# -fvisibility=hidden
+set(CMAKE_C_VISIBILITY_PRESET hidden)
+set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
+
 if (CMARK_SHARED)
   add_library(${LIBRARY} SHARED ${LIBRARY_SOURCES})
   set_target_properties(${LIBRARY} PROPERTIES