cmake_minimum_required(VERSION 3.10) project(DittoSuite) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED True) set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -Wall -fprofile-arcs -ftest-coverage") set(CMAKE_C_FLAGS_DEBUG "-g -O0 -Wall -fprofile-arcs -ftest-coverage") add_subdirectory(schema) include_directories(include) include_directories(${CMAKE_CURRENT_BINARY_DIR}) include_directories(${CMAKE_BINARY_DIR}/schema) file(GLOB libditto_src src/*.cpp ) file(GLOB_RECURSE ditto_benchmarks example/*.ditto ) add_custom_command( OUTPUT embedded_benchmarks.cpp COMMAND ${PROJECT_SOURCE_DIR}/ditto2cpp.py -o embedded_benchmarks.cpp -s ${ditto_benchmarks} DEPENDS ${ditto_benchmarks} VERBATIM ) add_library(libdittosuite STATIC ${libditto_src} embedded_benchmarks.cpp) target_link_libraries(libdittosuite benchmark_proto ${Protobuf_LIBRARIES} ${Protobuf_PROTOC_LIBRARIES} pthread ) add_executable(dittobench dittobench.cpp) add_executable(dittotrace dittotrace.cpp) target_link_libraries(dittobench libdittosuite ) target_link_libraries(dittotrace libdittosuite ) add_subdirectory(test)