Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 1 addition & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,24 +152,6 @@ if(CLICE_CI_ENVIRONMENT)
target_compile_definitions(clice_options INTERFACE CLICE_CI_ENVIRONMENT=1)
endif()

set(FBS_SCHEMA_FILE "${PROJECT_SOURCE_DIR}/src/index/schema.fbs")
set(GENERATED_HEADER "${PROJECT_BINARY_DIR}/generated/schema_generated.h")

# kotatsu builds the flatbuffers runtime but not its schema compiler, so flatc
# comes from the pixi environment (conda-forge flatbuffers). Its version must
# match the headers kotatsu fetches — the generated header static_asserts on
# that, so a mismatch surfaces as a compile error in schema_generated.h.
find_program(FLATC_EXECUTABLE flatc REQUIRED)

add_custom_command(
OUTPUT "${GENERATED_HEADER}"
COMMAND ${FLATC_EXECUTABLE} --cpp -o "${PROJECT_BINARY_DIR}/generated" "${FBS_SCHEMA_FILE}"
DEPENDS "${FBS_SCHEMA_FILE}" "${FLATC_EXECUTABLE}"
COMMENT "Generating C++ header from ${FBS_SCHEMA_FILE}"
)

add_custom_target(generate_flatbuffers_schema DEPENDS "${GENERATED_HEADER}")

# Version header, regenerated on every build so the embedded git describe
# tracks the checked-out commit (content-unchanged writes are elided).
set(CLICE_VERSION_HEADER "${PROJECT_BINARY_DIR}/generated/version.h")
Expand All @@ -192,7 +174,7 @@ add_custom_target(generate_version_header
file(GLOB_RECURSE CLICE_CORE_SOURCES CONFIGURE_DEPENDS "${PROJECT_SOURCE_DIR}/src/*.cpp")
add_library(clice-core STATIC ${CLICE_CORE_SOURCES})
add_library(clice::core ALIAS clice-core)
add_dependencies(clice-core generate_flatbuffers_schema generate_version_header)
add_dependencies(clice-core generate_version_header)

target_include_directories(clice-core PUBLIC
"${PROJECT_SOURCE_DIR}/src"
Expand Down
8 changes: 3 additions & 5 deletions cmake/package.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,16 @@ set(ENABLE_ROARING_MICROBENCHMARKS OFF CACHE INTERNAL "" FORCE)
FetchContent_Declare(
kotatsu
GIT_REPOSITORY https://github.com/clice-io/kotatsu
GIT_TAG af2b6d1c2bf19d5b9cd643e7dfa43739bfffb361
GIT_TAG 5232e67c28fee3a85ad01341a675dd4b78b122b1
)

set(KOTA_ENABLE_ZEST ON)
set(KOTA_ENABLE_TEST OFF)
set(KOTA_CODEC_ENABLE_SIMDJSON ON)
set(KOTA_CODEC_ENABLE_YYJSON ON)
set(KOTA_CODEC_ENABLE_TOML ON)
# kotatsu already fetches flatbuffers (v25.2.10) for its own codec and links the
# runtime lib into anything that uses kota::codec, so clice rides on that copy
# instead of fetching a second one. kotatsu does not build flatc, though, so the
# schema compiler comes from pixi instead (see CMakeLists.txt).
# kotatsu fetches the flatbuffers runtime (v25.2.10) for its codec and links it
# into anything that uses kota::codec; index serialization rides on that copy.
set(KOTA_CODEC_ENABLE_FLATBUFFERS ON)
set(KOTA_ENABLE_EXCEPTIONS OFF)
set(KOTA_ENABLE_RTTI OFF)
Expand Down
15 changes: 0 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading