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 )
10
3
11
4
include ("FindAsan.cmake" )
12
5
13
6
if ("${CMAKE_SOURCE_DIR} " STREQUAL "${CMAKE_BINARY_DIR} " )
14
7
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" )
15
8
endif ()
16
9
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
-
24
10
option (CMARK_TESTS "Build cmark tests and enable testing" ON )
25
11
option (CMARK_STATIC "Build static libcmark library" ON )
26
12
option (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
59
59
include (GenerateExportHeader )
60
60
61
61
add_executable (${PROGRAM} ${PROGRAM_SOURCES} )
62
- add_compiler_export_flags ()
63
62
64
63
# Disable the PUBLIC declarations when compiling the executable:
65
64
set_target_properties (${PROGRAM} PROPERTIES
@@ -72,12 +71,9 @@ set(CMAKE_LINKER_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG}")
72
71
set (CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE} -pg" )
73
72
set (CMAKE_LINKER_PROFILE "${CMAKE_LINKER_FLAGS_RELEASE} -pg" )
74
73
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 )
81
77
82
78
if (CMARK_SHARED )
83
79
add_library (${LIBRARY} SHARED ${LIBRARY_SOURCES} )
You can’t perform that action at this time.
0 commit comments