The best way to control Claude Code, Codex and more from any computer or phone

main
txt 40 lines 1.33 KB
Raw
1 cmake_minimum_required(VERSION 3.22.1)
2
3 project(t3highlights LANGUAGES C CXX)
4
5 set(CMAKE_CXX_STANDARD 20)
6 set(CMAKE_CXX_STANDARD_REQUIRED ON)
7 set(T3_HIGHLIGHTS_ROOT "${CMAKE_SOURCE_DIR}/..")
8
9 add_library(
10 t3highlights SHARED
11 src/main/cpp/cpp-adapter.cpp
12 "${T3_HIGHLIGHTS_ROOT}/cpp/HybridT3Highlights.cpp"
13 "${T3_HIGHLIGHTS_ROOT}/cpp/Utf16ToUtf8.cpp"
14 "${T3_HIGHLIGHTS_ROOT}/cpp/t3_highlights.c"
15 "${T3_HIGHLIGHTS_ROOT}/Vendor/highlights/highlights.c"
16 "${T3_HIGHLIGHTS_ROOT}/Vendor/wasm2c/wasm-rt-impl.c"
17 "${T3_HIGHLIGHTS_ROOT}/Vendor/wasm2c/wasm-rt-mem-impl.c"
18 )
19
20 include(${CMAKE_SOURCE_DIR}/../nitrogen/generated/android/t3highlights+autolinking.cmake)
21
22 target_include_directories(
23 t3highlights
24 PRIVATE "${T3_HIGHLIGHTS_ROOT}/cpp" "${T3_HIGHLIGHTS_ROOT}/Vendor"
25 "${T3_HIGHLIGHTS_ROOT}/Vendor/highlights" "${T3_HIGHLIGHTS_ROOT}/Vendor/wasm2c"
26 )
27
28 # Plain malloc memory with explicit bounds checks: no guard-page signal
29 # handlers competing with ART's.
30 target_compile_definitions(
31 t3highlights PRIVATE WASM_RT_USE_MMAP=0 WASM_RT_MEMCHECK_BOUNDS_CHECK=1
32 WASM_RT_SKIP_SIGNAL_RECOVERY=1
33 )
34
35 # The lexers are generated code; keep them fast in debug builds too.
36 target_compile_options(t3highlights PRIVATE -O2)
37
38 target_link_options(
39 t3highlights PRIVATE "-Wl,-z,common-page-size=16384" "-Wl,-z,max-page-size=16384"
40 )