diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2021-04-27 13:45:54 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2021-04-27 13:45:54 +0200 |
commit | 51d779256c74cc541da306db5629ed510df5a944 (patch) | |
tree | ec23431d0b9b3dac2a2a8ac8f7201e9da9c58632 /CMakeLists.txt | |
parent | da307fb4c6b5028d50c09dec7265ce8715e035d5 (diff) |
Switched from slow blocking cpp-httplib to libevent2.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index dc82f76..cb16281 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,14 +5,10 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release ... FORCE) endif() -set(CMAKE_CXX_FLAGS "-Wall -Wextra") +set(CMAKE_CXX_FLAGS "-Wall -Wextra -std=c++17") set(CMAKE_CXX_FLAGS_DEBUG "-g") -set(CMAKE_CXX_FLAGS_RELEASE "-Os -fno-pic -fomit-frame-pointer -flto -fno-rtti -ffunction-sections -fdata-sections") - -set(CPP_HTTPLIB_SRCDIR "${PROJECT_SOURCE_DIR}/deps/cpp-httplib" CACHE STRING "Path to the cpp-httplib source directory.") -if(NOT EXISTS "${CPP_HTTPLIB_SRCDIR}/httplib.h") - message(FATAL_ERROR "cpp-httplib missing") -endif() +set(CMAKE_CXX_FLAGS_RELEASE "-Os -fno-pic -fomit-frame-pointer -flto -fno-rtti -ffunction-sections -fdata-sections -fsanitize=address -fsanitize=leak -fsanitize=leak") +set(CMAKE_EXE_LINKER_FLAGS "-flto") set(INJA_SRCDIR "${PROJECT_SOURCE_DIR}/deps/inja" CACHE STRING "Path to the inja source directory.") if(NOT EXISTS "${INJA_SRCDIR}/single_include/inja/inja.hpp") @@ -26,4 +22,4 @@ add_executable(cpp-web ${SOURCES}) if(CMAKE_BUILD_TYPE MATCHES Release) set_target_properties(cpp-web PROPERTIES LINK_FLAGS "-no-pie -flto -Wl,--gc-sections -Wl,-z,norelro -Wl,--hash-style=gnu -Wl,--build-id=none") endif() -target_link_libraries(cpp-web pthread) +target_link_libraries(cpp-web pthread event) |