Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorLeitwolf112026-09-24 22:07:03 +0300
committerLeitwolf112026-09-24 22:07:03 +0300
commit9ad804cedf4cc4a85ef89fe097f97a3b44654360 (patch)
treef088e919776b22d19387377bdbec727daa2429c0 /src/CMakeLists.txt
parent02f8b5593a15cdec8558256e6f40a0c7fb5862d6 (diff)
downloadcatch3-0.1.0.tar.gz
Add Progmasoft Catch3 property testing and build support0.1.0
Introduce deterministic property execution, built-in generators, shrinking, replayable seeds, and a separate Progmasoft-owned header API while preserving Catch2 compatibility targets and the C++14 engine baseline. Add Bazel, Meson, Xmake, and Premake integration and tests alongside the existing CMake build. Replace Linux-only workflow coverage with Windows and macOS jobs and document the Catch2/Catch3 distinction.
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 886605f1..cb8c339d 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -360,6 +360,19 @@ if(CATCH_ENABLE_REPRODUCIBLE_BUILD)
endif()
add_library(Catch2::Catch2 ALIAS Catch2)
+# Progmasoft's C++20 additions are a separate target so the Catch2
+# compatibility engine can keep its existing, broader C++14 baseline.
+add_library(ProgmasoftCatch3 INTERFACE)
+add_library(Progmasoft::Catch3 ALIAS ProgmasoftCatch3)
+set_target_properties(ProgmasoftCatch3 PROPERTIES EXPORT_NAME Catch3)
+target_link_libraries(ProgmasoftCatch3 INTERFACE Catch2::Catch2)
+target_include_directories(ProgmasoftCatch3
+ INTERFACE
+ $<BUILD_INTERFACE:${CATCH_DIR}/src>
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
+)
+target_compile_features(ProgmasoftCatch3 INTERFACE cxx_std_20)
+
if(ANDROID)
target_link_libraries(Catch2 PRIVATE log)
endif()
@@ -436,6 +449,36 @@ if(NOT_SUBPROJECT)
FILES_MATCHING
PATTERN "*.hpp"
)
+
+ # Keep the independently licensed Progmasoft headers beside Catch2's public
+ # headers while preserving a separate CMake target and package namespace.
+ install(
+ DIRECTORY "${CATCH_DIR}/src/Progmasoft"
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
+ FILES_MATCHING PATTERN "*.hpp"
+ )
+ install(TARGETS ProgmasoftCatch3 EXPORT ProgmasoftCatch3Targets)
+ install(
+ EXPORT ProgmasoftCatch3Targets
+ NAMESPACE Progmasoft::
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/ProgmasoftCatch3"
+ )
+ configure_package_config_file(
+ "${CATCH_DIR}/src/Progmasoft/ProgmasoftCatch3Config.cmake.in"
+ "${PROJECT_BINARY_DIR}/ProgmasoftCatch3Config.cmake"
+ INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/ProgmasoftCatch3"
+ )
+ write_basic_package_version_file(
+ "${PROJECT_BINARY_DIR}/ProgmasoftCatch3ConfigVersion.cmake"
+ VERSION "${PROJECT_VERSION}"
+ COMPATIBILITY SameMajorVersion
+ )
+ install(
+ FILES
+ "${PROJECT_BINARY_DIR}/ProgmasoftCatch3Config.cmake"
+ "${PROJECT_BINARY_DIR}/ProgmasoftCatch3ConfigVersion.cmake"
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/ProgmasoftCatch3"
+ )
endif()
# Some tests require a full recompilation of Catch2 lib with different