mirror of
https://github.com/swiftlang/swift-cmark.git
synced 2026-01-18 17:31:20 +01:00
Revert "remove empty config.h and cmark-gfm_config.h headers"
This reverts commit 6f648763b2.
This commit is contained in:
@@ -76,6 +76,8 @@ endif()
|
||||
add_compile_definitions($<$<CONFIG:Debug>:CMARK_DEBUG_NODES>)
|
||||
# FIXME(compnerd) why do we not use `!defined(NDEBUG)`?
|
||||
add_compile_definitions($<$<CONFIG:Debug>:DEBUG>)
|
||||
# Use CMake's generated headers instead of the Swift package prebuilt ones
|
||||
add_compile_definitions(CMARK_USE_CMAKE_HEADERS)
|
||||
|
||||
add_compile_options($<$<AND:$<CONFIG:PROFILE>,$<COMPILE_LANGUAGE:C>>:-pg>)
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ let package = Package(
|
||||
exclude: [
|
||||
"scanners.re",
|
||||
"libcmark-gfm.pc.in",
|
||||
"config.h.in",
|
||||
"CMakeLists.txt",
|
||||
],
|
||||
cSettings: cSettings
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "cmark-gfm_config.h"
|
||||
#include "cmark-gfm.h"
|
||||
#include "node.h"
|
||||
#include "cmark-gfm-extension_api.h"
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libcmark-gfm.pc.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libcmark-gfm.pc @ONLY)
|
||||
|
||||
@@ -68,6 +71,7 @@ install(FILES
|
||||
include/chunk.h
|
||||
include/cmark_ctype.h
|
||||
include/cmark-gfm.h
|
||||
include/cmark-gfm_config.h
|
||||
include/cmark-gfm-extension_api.h
|
||||
include/cmark-gfm_version.h
|
||||
include/export.h
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
#include "cmark_ctype.h"
|
||||
#include "syntax_extension.h"
|
||||
#include "cmark-gfm_config.h"
|
||||
#include "parser.h"
|
||||
#include "cmark-gfm.h"
|
||||
#include "node.h"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "cmark-gfm_config.h"
|
||||
#include "cmark_ctype.h"
|
||||
#include "buffer.h"
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "cmark-gfm_config.h"
|
||||
#include "cmark-gfm.h"
|
||||
#include "node.h"
|
||||
#include "buffer.h"
|
||||
|
||||
12
src/config.h.in
Normal file
12
src/config.h.in
Normal file
@@ -0,0 +1,12 @@
|
||||
#ifndef CMARK_CONFIG_H
|
||||
#define CMARK_CONFIG_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "cmark_ctype.h"
|
||||
#include "cmark-gfm_config.h"
|
||||
#include "cmark-gfm.h"
|
||||
#include "houdini.h"
|
||||
#include "scanners.h"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <stdint.h>
|
||||
#include "cmark-gfm_config.h"
|
||||
#include "cmark-gfm.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
21
src/include/cmark-gfm_config.h
Normal file
21
src/include/cmark-gfm_config.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#ifndef CMARK_CONFIG_H
|
||||
#define CMARK_CONFIG_H
|
||||
|
||||
#ifdef CMARK_USE_CMAKE_HEADERS
|
||||
// if the CMake config header exists, use that instead of this Swift package prebuilt one
|
||||
// we need to undefine the header guard, since config.h uses the same one
|
||||
#undef CMARK_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* not CMARK_USE_CMAKE_HEADERS */
|
||||
|
||||
#endif /* not CMARK_CONFIG_H */
|
||||
@@ -2,7 +2,7 @@
|
||||
#define CMARK_HOUDINI_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "cmark-gfm_config.h"
|
||||
#include "buffer.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "cmark-gfm_config.h"
|
||||
#include "references.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
module cmark_gfm {
|
||||
header "cmark-gfm.h"
|
||||
header "cmark-gfm_config.h"
|
||||
header "cmark-gfm-extension_api.h"
|
||||
header "buffer.h"
|
||||
header "chunk.h"
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef CMARK_MUTEX_H
|
||||
#define CMARK_MUTEX_H
|
||||
|
||||
#include "cmark-gfm_config.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifndef CMARK_THREADING
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "cmark-gfm.h"
|
||||
#include "cmark-gfm-extension_api.h"
|
||||
#include "cmark-gfm_config.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "cmark_ctype.h"
|
||||
#include "cmark-gfm_config.h"
|
||||
#include "node.h"
|
||||
#include "parser.h"
|
||||
#include "references.h"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "cmark-gfm_config.h"
|
||||
#include "node.h"
|
||||
#include "cmark-gfm.h"
|
||||
#include "iterator.h"
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "cmark-gfm_config.h"
|
||||
#include "cmark-gfm.h"
|
||||
#include "node.h"
|
||||
#include "buffer.h"
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "cmark-gfm_config.h"
|
||||
#include "cmark-gfm.h"
|
||||
#include "node.h"
|
||||
#include "buffer.h"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "cmark-gfm_config.h"
|
||||
#include "mutex.h"
|
||||
#include "node.h"
|
||||
#include "syntax_extension.h"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "cmark-gfm_config.h"
|
||||
#include "cmark-gfm.h"
|
||||
#include "mutex.h"
|
||||
#include "syntax_extension.h"
|
||||
|
||||
Reference in New Issue
Block a user