Debian Codegraph @

3rdparty/catch2/CMake/CatchConfigOptions.cmake

raw
1
2 # Copyright Catch2 Authors
3 # Distributed under the Boost Software License, Version 1.0.
4 # (See accompanying file LICENSE.txt or copy at
5 # https://www.boost.org/LICENSE_1_0.txt)
6
7 # SPDX-License-Identifier: BSL-1.0
8
9 ##
10 # This file contains options that are materialized into the Catch2
11 # compiled library. All of them default to OFF, as even the positive
12 # forms correspond to the user _forcing_ them to ON, while being OFF
13 # means that Catch2 can use its own autodetection.
14 #
15 # For detailed docs look into docs/configuration.md
16
17
18 macro(AddOverridableConfigOption OptionBaseName)
19 option(CATCH_CONFIG_${OptionBaseName} "Read docs/configuration.md for details" OFF)
20 option(CATCH_CONFIG_NO_${OptionBaseName} "Read docs/configuration.md for details" OFF)
21 endmacro()
22
23 macro(AddConfigOption OptionBaseName)
24 option(CATCH_CONFIG_${OptionBaseName} "Read docs/configuration.md for details" OFF)
25 endmacro()
26
27 set(_OverridableOptions
28 "ANDROID_LOGWRITE"
29 "BAZEL_SUPPORT"
30 "COLOUR_WIN32"
31 "COUNTER"
32 "CPP11_TO_STRING"
33 "CPP17_BYTE"
34 "CPP17_OPTIONAL"
35 "CPP17_STRING_VIEW"
36 "CPP17_UNCAUGHT_EXCEPTIONS"
37 "CPP17_VARIANT"
38 "GLOBAL_NEXTAFTER"
39 "POSIX_SIGNALS"
40 "USE_ASYNC"
41 "WCHAR"
42 "WINDOWS_SEH"
43 "GETENV"
44 "EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT"
45 )
46
47 foreach(OptionName ${_OverridableOptions})
48 AddOverridableConfigOption(${OptionName})
49 endforeach()
50
51 set(_OtherConfigOptions
52 "DISABLE_EXCEPTIONS"
53 "DISABLE_EXCEPTIONS_CUSTOM_HANDLER"
54 "DISABLE"
55 "DISABLE_STRINGIFICATION"
56 "ENABLE_ALL_STRINGMAKERS"
57 "ENABLE_OPTIONAL_STRINGMAKER"
58 "ENABLE_PAIR_STRINGMAKER"
59 "ENABLE_TUPLE_STRINGMAKER"
60 "ENABLE_VARIANT_STRINGMAKER"
61 "EXPERIMENTAL_REDIRECT"
62 "FAST_COMPILE"
63 "NOSTDOUT"
64 "PREFIX_ALL"
65 "WINDOWS_CRTDBG"
66 )
67
68
69 foreach(OptionName ${_OtherConfigOptions})
70 AddConfigOption(${OptionName})
71 endforeach()
72 if(DEFINED BUILD_SHARED_LIBS)
73 set(CATCH_CONFIG_SHARED_LIBRARY ${BUILD_SHARED_LIBS})
74 else()
75 set(CATCH_CONFIG_SHARED_LIBRARY "")
76 endif()
77
78 set(CATCH_CONFIG_DEFAULT_REPORTER "console" CACHE STRING "Read docs/configuration.md for details. The name of the reporter should be without quotes.")
79 set(CATCH_CONFIG_CONSOLE_WIDTH "80" CACHE STRING "Read docs/configuration.md for details. Must form a valid integer literal.")
80
81 # There is no good way to both turn this into a CMake cache variable,
82 # and keep reasonable default semantics inside the project. Thus we do
83 # not define it and users have to provide it as an outside variable.
84 #set(CATCH_CONFIG_FALLBACK_STRINGIFIER "" CACHE STRING "Read docs/configuration.md for details.")