# Common utilities library
set(COMMON_SOURCES
    src/arena_allocator.cpp
    src/thread_pool.cpp
    src/mmap_utils.cpp
    src/secure_mem.cpp
    src/path_sanitizer.cpp
)

add_library(fetchml_common STATIC ${COMMON_SOURCES})

target_include_directories(fetchml_common PUBLIC
    ${CMAKE_CURRENT_SOURCE_DIR}/include
)

target_compile_features(fetchml_common PUBLIC cxx_std_17)

# Link pthread for thread support
target_link_libraries(fetchml_common PUBLIC pthread)
