Skip to content

Commit fa7f441

Browse files
committed
build: remove the use of generated export header
We have statically defined the header and use that in the SPM build anyway. Avoid the generation and uniformly use the static header.
1 parent 5234879 commit fa7f441

File tree

3 files changed

+0
-18
lines changed

3 files changed

+0
-18
lines changed

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/modules)
2121
include(CheckFileOffsetBits)
2222
include(CTest)
2323
include(FindAsan)
24-
include(GenerateExportHeader)
2524
include(GNUInstallDirs)
2625

2726
if(NOT MSVC OR CMAKE_HOST_SYSTEM_NAME STREQUAL Windows)

src/CMakeLists.txt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@ if (CMARK_SHARED)
7171
# Avoid name clash between PROGRAM and LIBRARY pdb files.
7272
set_target_properties(${LIBRARY} PROPERTIES PDB_NAME cmark-gfm_dll)
7373

74-
generate_export_header(${LIBRARY}
75-
BASE_NAME ${PROJECT_NAME})
76-
7774
list(APPEND CMARK_INSTALL ${LIBRARY})
7875
endif()
7976

@@ -98,11 +95,6 @@ if (CMARK_STATIC)
9895
VERSION ${PROJECT_VERSION})
9996
endif(MSVC)
10097

101-
if (NOT CMARK_SHARED)
102-
generate_export_header(${STATICLIBRARY}
103-
BASE_NAME ${PROJECT_NAME})
104-
endif()
105-
10698
list(APPEND CMARK_INSTALL ${STATICLIBRARY})
10799
endif()
108100

src/include/export.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
#ifndef CMARK_GFM_EXPORT_H
22
#define CMARK_GFM_EXPORT_H
33

4-
#ifdef CMARK_USE_CMAKE_HEADERS
5-
// if the CMake config header exists, use that instead of this Swift package prebuilt one
6-
// we need to undefine the header guard, since export.h uses the same one
7-
#undef CMARK_GFM_EXPORT_H
8-
#include "cmark-gfm_export.h"
9-
#else
10-
114
#ifdef CMARK_GFM_STATIC_DEFINE
125
# define CMARK_GFM_EXPORT
136
# define CMARK_GFM_NO_EXPORT
@@ -45,6 +38,4 @@
4538
# define CMARK_GFM_DEPRECATED_NO_EXPORT CMARK_GFM_NO_EXPORT CMARK_GFM_DEPRECATED
4639
#endif
4740

48-
#endif /* not CMARK_USE_CMAKE_HEADERS */
49-
5041
#endif /* not CMARK_GFM_EXPORT_H */

0 commit comments

Comments
 (0)