build: in cmake build, schema needs alternator

This patch is to cmake what the previous patch was to configure.py.

In the next patch we want to make schema/schema.o depend on
alternator/executor.o - because when the schema has an Alternator
computed column, the schema code needs to construct the computed column
object (extract_from_attrs_column_computation) and that lives in
alternator/executor.o.

In the cmake-based build, all the schema/* objects are put into one
library "libschema.a". But code that uses this library (e.g., tests)
can't just use that library alone, because it depends on other code
not in schema/. So CMakeLists.txt lists other "libraries" that
libschema.a depends on - including for example "cql3". We now need
to add "alternator" to this dependency list. The dependency is marked
"PRIVATE" - schema needs alternator for its own internal uses, but
doesn't need to export alternator's APIs to its own users.

Signed-off-by: Nadav Har'El <nyh@scylladb.com>
This commit is contained in:
Nadav Har'El
2025-01-07 17:30:10 +02:00
parent 1ebdf1a9f7
commit e8d1e8a515

View File

@@ -13,7 +13,9 @@ target_link_libraries(schema
idl
Seastar::seastar
xxHash::xxhash
absl::headers)
absl::headers
PRIVATE
alternator)
check_headers(check-headers schema
GLOB_RECURSE ${CMAKE_CURRENT_SOURCE_DIR}/*.hh)