Files
backup/CMakeLists.txt
Stepan Usatiuk 8f63891aee
Some checks failed
CMake / build (push) Has been cancelled
set cmake min for 3.18
for gitea actions runner
2023-11-26 13:49:34 +01:00

29 lines
802 B
CMake

cmake_minimum_required(VERSION 3.18)
project(backup)
if (SANITIZE STREQUAL "YES")
message(WARNING "Enabling sanitizers!")
add_compile_options(-Wall -Wextra -pedantic -Wshadow -Wformat=2 -Wfloat-equal -D_GLIBCXX_DEBUG -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2)
add_compile_options(-fsanitize=address -fsanitize=undefined -fno-sanitize-recover)
add_link_options(-fsanitize=address -fsanitize=undefined -fno-sanitize-recover)
endif ()
if (CMAKE_BUILD_TYPE STREQUAL "Release")
add_compile_options(-flto)
add_link_options(-flto)
endif ()
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
add_compile_options(-O3)
add_link_options(-O3)
endif ()
add_compile_options(-rdynamic)
add_link_options(-rdynamic)
enable_testing()
add_subdirectory(src)
add_subdirectory(tests)