2022-03-11 22:07:50 +01:00
|
|
|
load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
|
|
|
|
|
|
|
|
expand_template(
|
2022-04-08 18:01:59 +02:00
|
|
|
name = "catch_user_config",
|
2022-03-11 22:07:50 +01:00
|
|
|
out = "catch2/catch_user_config.hpp",
|
|
|
|
substitutions = {
|
2022-09-26 18:09:29 +02:00
|
|
|
"@CATCH_CONFIG_CONSOLE_WIDTH@": "80",
|
|
|
|
"@CATCH_CONFIG_DEFAULT_REPORTER@": "console",
|
2022-03-11 22:07:50 +01:00
|
|
|
"#cmakedefine CATCH_CONFIG_ANDROID_LOGWRITE": "",
|
2022-04-08 18:01:59 +02:00
|
|
|
"#cmakedefine CATCH_CONFIG_BAZEL_SUPPORT": "#define CATCH_CONFIG_BAZEL_SUPPORT",
|
2022-03-27 23:35:41 +02:00
|
|
|
"#cmakedefine CATCH_CONFIG_COLOUR_WIN32": "",
|
2022-03-11 22:07:50 +01:00
|
|
|
"#cmakedefine CATCH_CONFIG_COUNTER": "",
|
|
|
|
"#cmakedefine CATCH_CONFIG_CPP11_TO_STRING": "",
|
|
|
|
"#cmakedefine CATCH_CONFIG_CPP17_BYTE": "",
|
|
|
|
"#cmakedefine CATCH_CONFIG_CPP17_OPTIONAL": "",
|
|
|
|
"#cmakedefine CATCH_CONFIG_CPP17_STRING_VIEW": "",
|
|
|
|
"#cmakedefine CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS": "",
|
|
|
|
"#cmakedefine CATCH_CONFIG_CPP17_VARIANT": "",
|
|
|
|
"#cmakedefine CATCH_CONFIG_DISABLE_EXCEPTIONS_CUSTOM_HANDLER": "",
|
|
|
|
"#cmakedefine CATCH_CONFIG_DISABLE_EXCEPTIONS": "",
|
|
|
|
"#cmakedefine CATCH_CONFIG_DISABLE_STRINGIFICATION": "",
|
|
|
|
"#cmakedefine CATCH_CONFIG_DISABLE": "",
|
|
|
|
"#cmakedefine CATCH_CONFIG_ENABLE_ALL_STRINGMAKERS": "",
|
|
|
|
"#cmakedefine CATCH_CONFIG_ENABLE_OPTIONAL_STRINGMAKER": "",
|
|
|
|
"#cmakedefine CATCH_CONFIG_ENABLE_PAIR_STRINGMAKER": "",
|
|
|
|
"#cmakedefine CATCH_CONFIG_ENABLE_TUPLE_STRINGMAKER": "",
|
|
|
|
"#cmakedefine CATCH_CONFIG_ENABLE_VARIANT_STRINGMAKER": "",
|
|
|
|
"#cmakedefine CATCH_CONFIG_EXPERIMENTAL_REDIRECT": "",
|
|
|
|
"#cmakedefine CATCH_CONFIG_FALLBACK_STRINGIFIER @CATCH_CONFIG_FALLBACK_STRINGIFIER@": "",
|
|
|
|
"#cmakedefine CATCH_CONFIG_FAST_COMPILE": "",
|
2022-11-11 16:54:22 +01:00
|
|
|
"#cmakedefine CATCH_CONFIG_GETENV": "",
|
2022-03-11 22:07:50 +01:00
|
|
|
"#cmakedefine CATCH_CONFIG_GLOBAL_NEXTAFTER": "",
|
2022-09-26 18:09:29 +02:00
|
|
|
"#cmakedefine CATCH_CONFIG_NO_ANDROID_LOGWRITE": "",
|
|
|
|
"#cmakedefine CATCH_CONFIG_NO_COLOUR_WIN32": "",
|
2022-03-11 22:07:50 +01:00
|
|
|
"#cmakedefine CATCH_CONFIG_NO_COUNTER": "",
|
|
|
|
"#cmakedefine CATCH_CONFIG_NO_CPP11_TO_STRING": "",
|
|
|
|
"#cmakedefine CATCH_CONFIG_NO_CPP17_BYTE": "",
|
|
|
|
"#cmakedefine CATCH_CONFIG_NO_CPP17_OPTIONAL": "",
|
|
|
|
"#cmakedefine CATCH_CONFIG_NO_CPP17_STRING_VIEW": "",
|
|
|
|
"#cmakedefine CATCH_CONFIG_NO_CPP17_UNCAUGHT_EXCEPTIONS": "",
|
|
|
|
"#cmakedefine CATCH_CONFIG_NO_CPP17_VARIANT": "",
|
2022-11-11 16:54:22 +01:00
|
|
|
"#cmakedefine CATCH_CONFIG_NO_GETENV": "",
|
2022-03-11 22:07:50 +01:00
|
|
|
"#cmakedefine CATCH_CONFIG_NO_GLOBAL_NEXTAFTER": "",
|
|
|
|
"#cmakedefine CATCH_CONFIG_NO_POSIX_SIGNALS": "",
|
|
|
|
"#cmakedefine CATCH_CONFIG_NO_USE_ASYNC": "",
|
2023-05-12 17:13:21 +02:00
|
|
|
"#cmakedefine CATCH_CONFIG_NO_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT": "",
|
2022-03-11 22:07:50 +01:00
|
|
|
"#cmakedefine CATCH_CONFIG_NO_WCHAR": "",
|
|
|
|
"#cmakedefine CATCH_CONFIG_NO_WINDOWS_SEH": "",
|
|
|
|
"#cmakedefine CATCH_CONFIG_NOSTDOUT": "",
|
|
|
|
"#cmakedefine CATCH_CONFIG_POSIX_SIGNALS": "",
|
|
|
|
"#cmakedefine CATCH_CONFIG_PREFIX_ALL": "",
|
2023-07-19 17:04:43 +02:00
|
|
|
"#cmakedefine CATCH_CONFIG_PREFIX_MESSAGES": "",
|
2022-09-26 18:09:29 +02:00
|
|
|
"#cmakedefine CATCH_CONFIG_SHARED_LIBRARY": "",
|
2023-05-12 17:13:21 +02:00
|
|
|
"#cmakedefine CATCH_CONFIG_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT": "",
|
2022-03-11 22:07:50 +01:00
|
|
|
"#cmakedefine CATCH_CONFIG_USE_ASYNC": "",
|
|
|
|
"#cmakedefine CATCH_CONFIG_WCHAR": "",
|
|
|
|
"#cmakedefine CATCH_CONFIG_WINDOWS_CRTDBG": "",
|
|
|
|
"#cmakedefine CATCH_CONFIG_WINDOWS_SEH": "",
|
2024-10-27 17:08:47 +01:00
|
|
|
"#cmakedefine CATCH_CONFIG_USE_BUILTIN_CONSTANT_P": "",
|
|
|
|
"#cmakedefine CATCH_CONFIG_NO_USE_BUILTIN_CONSTANT_P": "",
|
2022-03-11 22:07:50 +01:00
|
|
|
},
|
|
|
|
template = "src/catch2/catch_user_config.hpp.in",
|
|
|
|
)
|
|
|
|
|
2022-04-08 18:01:59 +02:00
|
|
|
# Generated header library, modifies the include prefix to account for
|
|
|
|
# generation path so that we can include <catch2/catch_user_config.hpp>
|
|
|
|
# correctly.
|
|
|
|
cc_library(
|
|
|
|
name = "catch2_generated",
|
|
|
|
hdrs = ["catch2/catch_user_config.hpp"],
|
|
|
|
include_prefix = ".", # to manipulate -I of dependenices
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
|
|
|
|
2020-05-25 15:44:57 +02:00
|
|
|
# Static library, without main.
|
|
|
|
cc_library(
|
|
|
|
name = "catch2",
|
2022-04-08 18:01:59 +02:00
|
|
|
srcs = glob(
|
|
|
|
["src/catch2/**/*.cpp"],
|
|
|
|
exclude = ["src/catch2/internal/catch_main.cpp"],
|
|
|
|
),
|
|
|
|
hdrs = glob(["src/catch2/**/*.hpp"]),
|
2020-05-25 15:44:57 +02:00
|
|
|
includes = ["src/"],
|
2022-04-08 18:01:59 +02:00
|
|
|
linkstatic = True,
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
deps = [":catch2_generated"],
|
2020-05-25 15:44:57 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
# Static library, with main.
|
|
|
|
cc_library(
|
|
|
|
name = "catch2_main",
|
|
|
|
srcs = ["src/catch2/internal/catch_main.cpp"],
|
|
|
|
includes = ["src/"],
|
2022-04-08 18:01:59 +02:00
|
|
|
linkstatic = True,
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
deps = [":catch2"],
|
2022-09-18 15:03:38 +02:00
|
|
|
)
|