1cmake_minimum_required(VERSION 3.10) 2project(DittoSuite) 3 4set(CMAKE_CXX_STANDARD 17) 5set(CMAKE_CXX_STANDARD_REQUIRED True) 6 7set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -Wall -fprofile-arcs -ftest-coverage") 8set(CMAKE_C_FLAGS_DEBUG "-g -O0 -Wall -fprofile-arcs -ftest-coverage") 9 10add_subdirectory(schema) 11 12include_directories(include) 13include_directories(${CMAKE_CURRENT_BINARY_DIR}) 14include_directories(${CMAKE_BINARY_DIR}/schema) 15 16file(GLOB libditto_src 17 src/*.cpp 18) 19 20file(GLOB_RECURSE ditto_benchmarks 21 example/*.ditto 22) 23 24add_custom_command( 25 OUTPUT embedded_benchmarks.cpp 26 COMMAND ${PROJECT_SOURCE_DIR}/ditto2cpp.py 27 -o embedded_benchmarks.cpp 28 -s ${ditto_benchmarks} 29 VERBATIM 30) 31 32add_library(libdittosuite STATIC ${libditto_src} embedded_benchmarks.cpp) 33 34target_link_libraries(libdittosuite 35 benchmark_proto 36 ${Protobuf_LIBRARIES} 37 ${Protobuf_PROTOC_LIBRARIES} 38 pthread 39) 40 41add_executable(dittobench dittobench.cpp) 42add_executable(dittotrace dittotrace.cpp) 43 44target_link_libraries(dittobench 45 libdittosuite 46) 47 48target_link_libraries(dittotrace 49 libdittosuite 50) 51 52add_subdirectory(test) 53