1
0
Fork 0
mirror of https://github.com/zigzap/zap.git synced 2025-10-20 23:24:09 +00:00
zap/wrk/cpp/CMakeLists.txt
sehe b87f3a2a01 Rewrite beast C++ test server
This happens to use C++20 coroutines because I'm lazy. It can
equivalently be written without.

I reworded measure.sh to use cmake instead of zig build. Again, I'm lazy
and don't wish to learn zig build today.

The flake had dependency issues
 - for one, the beast archive references in cpp/build.zig.zon is gone;
 - secondly the upstream zig flake does not have zig 12.0 ¯\_(ツ)_/¯
   Luckily that's in Nixpkgs, so I switched to nixpkgs-unstable.
 - I also added a `liburing` dependency to the devShell. This was to
   test with uring, but it didn't produce better results
2024-06-12 02:27:46 +02:00

18 lines
552 B
CMake

cmake_minimum_required(VERSION 3.10)
project(cpp_beast)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic ")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -mtune=native -Ofast ")
find_package(Boost 1.84.0 CONFIG REQUIRED COMPONENTS system)
link_libraries(Boost::system)
add_executable(cpp_beast main.cpp)
target_link_libraries(cpp_beast uring)
target_compile_definitions(cpp_beast PRIVATE
BOOST_BEAST_USE_STD_STRING_VIEW=1
BOOST_ASIO_NO_DEPRECATED=1
#TRUE_HTTP=1
#CACHED_RESPONSE=1
)