mirror of
https://github.com/usatiuk/backup.git
synced 2025-10-26 09:27:48 +01:00
install target
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
cmake_minimum_required(VERSION 3.22)
|
cmake_minimum_required(VERSION 3.22)
|
||||||
|
|
||||||
|
project(backup)
|
||||||
|
|
||||||
if (SANITIZE STREQUAL "YES")
|
if (SANITIZE STREQUAL "YES")
|
||||||
message(WARNING "Enabling sanitizers!")
|
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(-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)
|
add_link_options(-flto)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
|
add_compile_options(-O3)
|
||||||
|
add_link_options(-O3)
|
||||||
|
endif ()
|
||||||
|
|
||||||
add_compile_options(-rdynamic)
|
add_compile_options(-rdynamic)
|
||||||
add_link_options(-rdynamic)
|
add_link_options(-rdynamic)
|
||||||
|
|
||||||
project(backup)
|
|
||||||
|
|
||||||
enable_testing()
|
enable_testing()
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
|||||||
@@ -14,3 +14,5 @@ add_subdirectory(fuse)
|
|||||||
|
|
||||||
add_executable(backup main.cpp)
|
add_executable(backup main.cpp)
|
||||||
target_link_libraries(backup PRIVATE change_detectors chunkers commands crypto filters repo utils)
|
target_link_libraries(backup PRIVATE change_detectors chunkers commands crypto filters repo utils)
|
||||||
|
|
||||||
|
install(TARGETS backup DESTINATION bin)
|
||||||
@@ -16,6 +16,7 @@ FetchContent_Declare(
|
|||||||
)
|
)
|
||||||
# For Windows: Prevent overriding the parent project's compiler/linker settings
|
# For Windows: Prevent overriding the parent project's compiler/linker settings
|
||||||
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
||||||
|
set(INSTALL_GTEST OFF)
|
||||||
FetchContent_MakeAvailable(googletest)
|
FetchContent_MakeAvailable(googletest)
|
||||||
include(GoogleTest)
|
include(GoogleTest)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user