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.
This commit is contained in:
Saleem Abdulrasool
2024-01-05 09:09:19 -08:00
parent c788cd0669
commit aef4761a78
4 changed files with 5 additions and 5 deletions

View File

@@ -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)

View File

@@ -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(

View File

@@ -5,8 +5,6 @@
extern "C" {
#endif
#cmakedefine CMARK_THREADING
#ifdef __cplusplus
}
#endif

View File

@@ -12,8 +12,6 @@
extern "C" {
#endif
#define CMARK_THREADING
#ifdef __cplusplus
}
#endif