--- CMakeLists.txt.orig	2023-06-18 08:43:43 UTC
+++ CMakeLists.txt
@@ -37,7 +37,7 @@ endif()
 option(TROMPELOEIL_INSTALL_TARGETS "Sets whether trompeloeil should be installed" ${MASTER_PROJECT})
 option(TROMPELOEIL_INSTALL_DOCS "Install documentation" ${TROMPELOEIL_INSTALL_TARGETS})
 
-if (MASTER_PROJECT AND CMAKE_BUILD_TYPE MATCHES Debug)
+if (BUILD_TESTING)
   add_subdirectory(test)
 
 endif() # MASTER_PROJECT AND CMAKE_BUILD_TYPE MATCHES Debug
