Skip to content

Commit aef4761

Browse files
committed
build: hoist CMARK_THREADING to a build-only config
This macro does not impact the public API surface and the user should not have to care. This removes the macro from the configuration headers.
1 parent c788cd0 commit aef4761

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ include(FindAsan)
2121
if(CMARK_THREADING)
2222
set(THREADS_PREFER_PTHREAD_FLAG YES)
2323
include(FindThreads)
24+
add_compile_definitions(CMARK_THREADING)
2425
endif()
2526
include(GNUInstallDirs)
2627

Package.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ import PackageDescription
1111
// link time.
1212
let cSettings: [CSetting] = [
1313
.define("CMARK_GFM_STATIC_DEFINE", .when(platforms: [.windows])),
14+
.define("CMARK_THREADING"),
1415
]
1516
#else
16-
let cSettings: [CSetting] = []
17+
let cSettings: [CSetting] = [
18+
.define("CMARK_THREADING"),
19+
]
1720
#endif
1821

1922
let package = Package(

src/config.h.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
extern "C" {
66
#endif
77

8-
#cmakedefine CMARK_THREADING
9-
108
#ifdef __cplusplus
119
}
1210
#endif

src/include/cmark-gfm_config.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
extern "C" {
1313
#endif
1414

15-
#define CMARK_THREADING
16-
1715
#ifdef __cplusplus
1816
}
1917
#endif

0 commit comments

Comments
 (0)