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

summaryrefslogtreecommitdiffhomepage
path: root/premake5.lua
diff options
context:
space:
mode:
authorLeitwolf112026-09-24 22:07:03 +0300
committerLeitwolf112026-09-24 22:07:03 +0300
commit9ad804cedf4cc4a85ef89fe097f97a3b44654360 (patch)
treef088e919776b22d19387377bdbec727daa2429c0 /premake5.lua
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 'premake5.lua')
-rw-r--r--premake5.lua68
1 files changed, 68 insertions, 0 deletions
diff --git a/premake5.lua b/premake5.lua
new file mode 100644
index 00000000..a03b8734
--- /dev/null
+++ b/premake5.lua
@@ -0,0 +1,68 @@
+-- Copyright (c) 2026 Progmasoft.
+-- SPDX-License-Identifier: MPL-2.0 WITH AdditionRef-Progmasoft-Exception-1.1
+
+local repository_root = path.getabsolute(".")
+local generated_include = path.join(repository_root, "build", "premake", "generated")
+local configure_catch2 = dofile(path.join(repository_root, "buildsupport", "catch2_config.lua"))
+configure_catch2.generate(generated_include, repository_root)
+
+workspace "Catch3"
+ location "build/premake"
+ configurations { "Debug", "Release" }
+ startproject "ProgmasoftPropertyTests"
+
+ filter "system:windows"
+ architecture "x86_64"
+ filter {}
+
+ filter "system:macosx"
+ toolset "clang"
+ filter {}
+
+ filter "configurations:Debug"
+ symbols "On"
+ runtime "Debug"
+ filter "configurations:Release"
+ optimize "Speed"
+ runtime "Release"
+ filter {}
+
+project "Catch2"
+ kind "StaticLib"
+ language "C++"
+ cppdialect "C++14"
+ targetdir "build/premake/bin/%{cfg.buildcfg}"
+ objdir "build/premake/obj/Catch2/%{cfg.buildcfg}"
+ files {
+ "src/catch2/**.cpp",
+ "src/catch2/**.hpp",
+ path.join(generated_include, "catch2", "catch_user_config.hpp"),
+ }
+ removefiles { "src/catch2/internal/catch_main.cpp" }
+ includedirs { "src", generated_include }
+
+project "Catch2WithMain"
+ kind "StaticLib"
+ language "C++"
+ cppdialect "C++14"
+ -- Visual Studio injects UNICODE for Windows projects, which would select
+ -- Catch2's wmain entry point instead of the normal console main.
+ defines { "DO_NOT_USE_WMAIN" }
+ targetdir "build/premake/bin/%{cfg.buildcfg}"
+ objdir "build/premake/obj/Catch2WithMain/%{cfg.buildcfg}"
+ files { "src/catch2/internal/catch_main.cpp" }
+ includedirs { "src", generated_include }
+ links { "Catch2" }
+
+project "ProgmasoftPropertyTests"
+ kind "ConsoleApp"
+ language "C++"
+ cppdialect "C++20"
+ targetdir "build/premake/bin/%{cfg.buildcfg}"
+ objdir "build/premake/obj/ProgmasoftPropertyTests/%{cfg.buildcfg}"
+ files {
+ "tests/Progmasoft/Property.tests.cpp",
+ "src/Progmasoft/**.hpp",
+ }
+ includedirs { "src", generated_include }
+ links { "Catch2WithMain", "Catch2" }