file(GLOB SRCS *.cpp)

add_library(casd STATIC ${SRCS})
target_precompile_headers(casd REUSE_FROM common)
target_link_libraries(casd common commonmetrics)

add_executable(buildbox-casd bin/buildboxcasd.m.cpp)
target_precompile_headers(buildbox-casd REUSE_FROM common)
target_link_libraries(buildbox-casd casd)
target_include_directories(buildbox-casd PRIVATE ".")
install(TARGETS buildbox-casd RUNTIME DESTINATION bin)

add_subdirectory(test)

option(CASD_BUILD_BENCHMARK "Build benchmarks" ON)
if(CASD_BUILD_BENCHMARK)
    add_subdirectory(benchmark)
endif()
target_include_directories(casd PUBLIC ".")
