Skip to content

Commit

Permalink
build: hoist CMARK_THREADING to a build-only config
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
compnerd committed Jan 5, 2024
1 parent c788cd0 commit aef4761
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ include(FindAsan)
if(CMARK_THREADING)
set(THREADS_PREFER_PTHREAD_FLAG YES)
include(FindThreads)
add_compile_definitions(CMARK_THREADING)
endif()
include(GNUInstallDirs)

Expand Down
5 changes: 4 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ import PackageDescription
// link time.
let cSettings: [CSetting] = [
.define("CMARK_GFM_STATIC_DEFINE", .when(platforms: [.windows])),
.define("CMARK_THREADING"),
]
#else
let cSettings: [CSetting] = []
let cSettings: [CSetting] = [
.define("CMARK_THREADING"),
]
#endif

let package = Package(
Expand Down
2 changes: 0 additions & 2 deletions src/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
extern "C" {
#endif

#cmakedefine CMARK_THREADING

#ifdef __cplusplus
}
#endif
Expand Down
2 changes: 0 additions & 2 deletions src/include/cmark-gfm_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
extern "C" {
#endif

#define CMARK_THREADING

#ifdef __cplusplus
}
#endif
Expand Down

0 comments on commit aef4761

Please sign in to comment.