summaryrefslogtreecommitdiff
path: root/cmake/utils/DisableTestLogging.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/utils/DisableTestLogging.cmake')
-rw-r--r--cmake/utils/DisableTestLogging.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/cmake/utils/DisableTestLogging.cmake b/cmake/utils/DisableTestLogging.cmake
new file mode 100644
index 00000000..40c16668
--- /dev/null
+++ b/cmake/utils/DisableTestLogging.cmake
@@ -0,0 +1,11 @@
+# Macro to apply test logging settings to a target
+# Configuration options are in cmake/config/tests.cmake
+
+macro(disable_test_logging_for_target target)
+ if(DISABLE_TESTS_LOGGING)
+ target_compile_definitions(${target} PRIVATE OUROBOROS_DISABLE_LOGGING)
+ endif()
+ if(DISABLE_TESTS_CORE_DUMPS)
+ target_compile_definitions(${target} PRIVATE DISABLE_TESTS_CORE_DUMPS)
+ endif()
+endmacro()