Skip to content

Commit 3a8a7b5

Browse files
authored
chore: Update note-c to v2.5.2 (#148)
* Remove `note-c` before re-add * Squashed 'src/note-c/' content from commit 56d35efd git-subtree-dir: src/note-c git-subtree-split: 56d35efdf40b1abd1936c0297baf9eb31535bdd8 * Remove unneeded directories from `note-c`
1 parent 5492b60 commit 3a8a7b5

File tree

11 files changed

+1922
-781
lines changed

11 files changed

+1922
-781
lines changed

src/note-c/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ settings.json
1313
CMakeFiles/
1414
CMakeCache.txt
1515
cppcheck_output.txt
16+
17+
.claude/

src/note-c/CMakeLists.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ option(NOTE_C_BUILD_TESTS "Build tests." ON)
2020
option(NOTE_C_COVERAGE "Compile for test NOTE_C_COVERAGE reporting." OFF)
2121
option(NOTE_C_LOW_MEM "Build the library tailored for low memory usage." OFF)
2222
option(NOTE_C_MEM_CHECK "Run tests with Valgrind." OFF)
23+
option(NOTE_NODEBUG "Build the library without debug information." OFF)
2324
option(NOTE_C_NO_LIBC "Build the library without linking against libc, generating errors for any undefined symbols." OFF)
2425
option(NOTE_C_SHOW_MALLOC "Build the library with flags required to log memory usage." OFF)
2526
option(NOTE_C_SINGLE_PRECISION "Use single precision for JSON floating point numbers." OFF)
27+
option(NOTE_C_HEARTBEAT_CALLBACK "Enable heartbeat callback support." OFF)
2628

2729
set(NOTE_C_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR})
2830
add_library(note_c SHARED)
@@ -104,6 +106,14 @@ if(NOTE_C_NO_LIBC)
104106
)
105107
endif()
106108

109+
if(NOTE_NODEBUG)
110+
target_compile_definitions(
111+
note_c
112+
PUBLIC
113+
NOTE_NODEBUG
114+
)
115+
endif()
116+
107117
if(NOTE_C_SHOW_MALLOC)
108118
target_compile_definitions(
109119
note_c
@@ -120,6 +130,14 @@ if(NOTE_C_SINGLE_PRECISION)
120130
)
121131
endif()
122132

133+
if(NOTE_C_HEARTBEAT_CALLBACK)
134+
target_compile_definitions(
135+
note_c
136+
PUBLIC
137+
NOTE_C_HEARTBEAT_CALLBACK
138+
)
139+
endif()
140+
123141
if(NOTE_C_BUILD_TESTS)
124142
# Including CTest here rather than in test/CMakeLists.txt allows us to run
125143
# ctest from the root build directory (e.g. build/ instead of build/test/).

0 commit comments

Comments
 (0)