make tests optional

This commit is contained in:
David Roman
2024-03-11 19:25:30 +01:00
parent c6ae3fe3fa
commit 3261cc6550
+7 -2
View File
@@ -10,11 +10,16 @@ if (UNIX)
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined") set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined")
endif () endif ()
include(CTest) option(ENABLE_TESTS "Enable tests" ON)
if(ENABLE_TESTS)
include(CTest)
find_package(GTest REQUIRED)
endif()
find_package(PkgConfig REQUIRED) find_package(PkgConfig REQUIRED)
find_package(Threads REQUIRED) find_package(Threads REQUIRED)
find_package(Filesystem REQUIRED) find_package(Filesystem REQUIRED)
find_package(GTest REQUIRED)
find_package(Boost REQUIRED COMPONENTS system program_options) find_package(Boost REQUIRED COMPONENTS system program_options)
find_package(Wt REQUIRED COMPONENTS Wt Dbo DboSqlite3 HTTP) find_package(Wt REQUIRED COMPONENTS Wt Dbo DboSqlite3 HTTP)
pkg_check_modules(Taglib REQUIRED IMPORTED_TARGET taglib) pkg_check_modules(Taglib REQUIRED IMPORTED_TARGET taglib)