File tree Expand file tree Collapse file tree 2 files changed +5
-23
lines changed Expand file tree Collapse file tree 2 files changed +5
-23
lines changed Original file line number Diff line number Diff line change 1- cmake_minimum_required (VERSION 2.8.9)
2-
3- # prevent ugly developer warnings because version is set directly, not through project()
4- # it should be redone properly by using VERSION in project() if on CMake 3.x
5- if (CMAKE_MAJOR_VERSION GREATER 2)
6- cmake_policy (SET CMP0048 OLD)
7- endif ()
8-
9- project (cmark)
1+ cmake_minimum_required (VERSION 3.0)
2+ project (cmark VERSION 0.28.3)
103
114include ("FindAsan.cmake" )
125
136if ("${CMAKE_SOURCE_DIR} " STREQUAL "${CMAKE_BINARY_DIR} " )
147 message (FATAL_ERROR "Do not build in-source.\n Please remove CMakeCache.txt and the CMakeFiles/ directory.\n Then: mkdir build ; cd build ; cmake .. ; make" )
158endif ()
169
17- set (PROJECT_NAME "cmark" )
18-
19- set (PROJECT_VERSION_MAJOR 0)
20- set (PROJECT_VERSION_MINOR 28)
21- set (PROJECT_VERSION_PATCH 3)
22- set (PROJECT_VERSION ${PROJECT_VERSION_MAJOR} .${PROJECT_VERSION_MINOR} .${PROJECT_VERSION_PATCH} )
23-
2410option (CMARK_TESTS "Build cmark tests and enable testing" ON )
2511option (CMARK_STATIC "Build static libcmark library" ON )
2612option (CMARK_SHARED "Build shared libcmark library" ON )
Original file line number Diff line number Diff line change @@ -59,7 +59,6 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmark_version.h.in
5959include (GenerateExportHeader)
6060
6161add_executable (${PROGRAM} ${PROGRAM_SOURCES} )
62- add_compiler_export_flags()
6362
6463# Disable the PUBLIC declarations when compiling the executable:
6564set_target_properties (${PROGRAM} PROPERTIES
@@ -72,12 +71,9 @@ set(CMAKE_LINKER_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG}")
7271set (CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE} -pg" )
7372set (CMAKE_LINKER_PROFILE "${CMAKE_LINKER_FLAGS_RELEASE} -pg" )
7473
75- if (${CMAKE_VERSION} VERSION_GREATER "1.8" )
76- set (CMAKE_C_VISIBILITY_PRESET hidden)
77- set (CMAKE_VISIBILITY_INLINES_HIDDEN 1)
78- elseif (CMAKE_COMPILER_IS_GNUCC OR ${CMAKE_C_COMPILER_ID} STREQUAL "Clang" )
79- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden" )
80- endif ()
74+ # -fvisibility=hidden
75+ set (CMAKE_C_VISIBILITY_PRESET hidden)
76+ set (CMAKE_VISIBILITY_INLINES_HIDDEN 1)
8177
8278if (CMARK_SHARED)
8379 add_library (${LIBRARY} SHARED ${LIBRARY_SOURCES} )
You can’t perform that action at this time.
0 commit comments