From 0ec1b8c98a2373258e133eaafebfc3fdd4b948be Mon Sep 17 00:00:00 2001 From: Hans Dembinski <hans.dembinski@gmail.com> Date: Wed, 22 May 2019 10:54:51 +0200 Subject: [PATCH] added docs --- CMakeModules/CorsikaUtilities.cmake | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/CMakeModules/CorsikaUtilities.cmake b/CMakeModules/CorsikaUtilities.cmake index ba083a98..5d6fb773 100644 --- a/CMakeModules/CorsikaUtilities.cmake +++ b/CMakeModules/CorsikaUtilities.cmake @@ -95,9 +95,30 @@ endmacro(CORSIKA_ADD_FILES_ABSOLUTE) ################################################# # -# central macro to activate unit tests in cmake +# central macro to register unit tests in cmake # - +# 1) Simple use: +# Pass the name of the test.cc file as the first +# argument, without the ".cc" extention. +# +# Example: CORSIKA_ADD_TEST(testSomething) +# (generates target testSomething from file testSomething.cc) +# +# 2) Customize sources +# If 1) doesn't work, use the SOURCES keyword to explicitly +# specify the sources. +# +# Example: CORSIKA_ADD_TEST(testSomething SOURCES source1.cc source2.cc someheader.h) +# +# 3) Customize sanitizers +# You can override which sanitizers are compiled into the +# test, but only do this if the defaults do not work. +# +# Example: CORSIKA_ADD_TEST(testSomething SANITIZE undefined) +# (only uses the sanitizer for undefined behavior) +# +# In all cases, you can further customize the target with +# target_link_libraries(testSomething ...) and so on. function (CORSIKA_ADD_TEST) cmake_parse_arguments(PARSE_ARGV 1 _ "" "SANITIZE" "SOURCES") -- GitLab