install target

This commit is contained in:
2023-07-15 13:43:33 +02:00
parent c888efb366
commit dba5f06c10
3 changed files with 11 additions and 3 deletions

View File

@@ -1,5 +1,7 @@
cmake_minimum_required(VERSION 3.22)
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)
@@ -12,11 +14,14 @@ if (CMAKE_BUILD_TYPE STREQUAL "Release")
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)
project(backup)
enable_testing()
add_subdirectory(src)