aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorhsdk123 <[email protected]>2023-06-11 23:31:03 -0400
committerGitHub <[email protected]>2023-06-12 03:31:03 +0000
commit2d86d8b84fa54df4f6ce5e4942e617164cb5cc6d (patch)
tree9e53fc6ed81cd4b4043423eeeacf10f4aad860bf /CMakeLists.txt
parent3d9900476ec49b2994b7163a451a69560d498306 (diff)
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
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
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}