From 2d86d8b84fa54df4f6ce5e4942e617164cb5cc6d Mon Sep 17 00:00:00 2001 From: hsdk123 Date: Sun, 11 Jun 2023 23:31:03 -0400 Subject: Add gtest integration (#860) * Add gtest integration * Update gtest fetch * Add ctest * Update CI * Update CI * enable testing * Make tests off by default * Update gitignore --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index c73dee55..34fd3312 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,7 @@ # CMake build file list for OpenAL cmake_minimum_required(VERSION 3.0.2) +enable_testing() if(APPLE) # The workaround for try_compile failing with code signing @@ -111,6 +112,7 @@ option(ALSOFT_UTILS "Build utility programs" ON) option(ALSOFT_NO_CONFIG_UTIL "Disable building the alsoft-config utility" OFF) option(ALSOFT_EXAMPLES "Build example programs" ON) +option(ALSOFT_TESTS "Build test programs" OFF) option(ALSOFT_INSTALL "Install main library" ON) option(ALSOFT_INSTALL_CONFIG "Install alsoft.conf sample configuration file" ON) @@ -1820,6 +1822,10 @@ if(ALSOFT_EXAMPLES) message(STATUS "") endif() +if (ALSOFT_TESTS) +add_subdirectory(tests) +endif() + if(EXTRA_INSTALLS) install(TARGETS ${EXTRA_INSTALLS} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -- cgit v1.2.3