make tests optional

This commit is contained in:
David Roman
2024-03-12 13:08:30 +01:00
committed by emeric
parent d876a2df0c
commit 58848dfae3
+6 -1
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 ()
option(ENABLE_TESTS "Enable tests" ON)
if(ENABLE_TESTS)
include(CTest) 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)