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

summaryrefslogtreecommitdiffhomepage
path: root/premake5.lua
diff options
context:
space:
mode:
authorLeitwolf2026-10-25 10:31:36 +0300
committerGitHub2026-10-25 10:31:36 +0300
commitd2e3e074bb2e1b8ffd9fc990d0b87667ea602f58 (patch)
tree0bce4462b2e190c39b3e1c5f697e3e4abd1a5e2a /premake5.lua
parent13f81a480a93807c14dddb5abdb97355ced4d4c5 (diff)
parent126dc333564cb72b5115d9a9242d66694694b6d0 (diff)
downloadcatch3-d2e3e074bb2e1b8ffd9fc990d0b87667ea602f58.tar.gz
Merge pull request #18 from Progmasoft/build/catch3-identity
Give Catch3 its own build names and headers
Diffstat (limited to 'premake5.lua')
-rw-r--r--premake5.lua53
1 files changed, 21 insertions, 32 deletions
diff --git a/premake5.lua b/premake5.lua
index 316b4009..9f153d79 100644
--- a/premake5.lua
+++ b/premake5.lua
@@ -3,8 +3,8 @@
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)
+local configure_catch3 = dofile(path.join(repository_root, "buildsupport", "catch3_config.lua"))
+configure_catch3.generate(generated_include, repository_root)
workspace "Catch3"
location "build/premake"
@@ -28,27 +28,33 @@ workspace "Catch3"
runtime "Release"
filter {}
--- Catch2's engine with the Catch3 runner; the library is C++20, its headers
--- need only C++14 in the code that includes them.
-project "Catch2"
+-- The Catch2-compatible engine, the Catch3 runner, property testing and
+-- snapshots; the library is C++20, the engine's headers need only C++14 in
+-- the code that includes them.
+project "Catch3"
kind "StaticLib"
language "C++"
cppdialect "C++20"
targetdir "build/premake/bin/%{cfg.buildcfg}"
- objdir "build/premake/obj/Catch2/%{cfg.buildcfg}"
+ objdir "build/premake/obj/Catch3/%{cfg.buildcfg}"
files {
- "src/catch2/**.cpp",
- "src/catch2/**.hpp",
+ "src/Progmasoft/Catch3/**.cpp",
"src/Progmasoft/Runner/*.cpp",
"src/Progmasoft/Runner/*.hpp",
"src/Progmasoft/Results.cpp",
"src/Progmasoft/XmlWriter.cpp",
- path.join(generated_include, "catch2", "catch_user_config.hpp"),
+ "src/Progmasoft/ChoiceShrinker.cpp",
+ "src/Progmasoft/StrategyContext.cpp",
+ "src/Progmasoft/PropertyEngine.cpp",
+ "src/Progmasoft/Snapshot.cpp",
+ "src/Progmasoft/Catch3/**.hpp",
+ "src/Progmasoft/Catch3.hpp",
+ path.join(generated_include, "Progmasoft", "Catch3", "UserConfig.hpp"),
}
- removefiles { "src/catch2/internal/catch_main.cpp" }
+ removefiles { "src/Progmasoft/Catch3/Internal/Main.cpp" }
includedirs { "src", generated_include }
-project "Catch2WithMain"
+project "Catch3WithMain"
kind "StaticLib"
language "C++"
cppdialect "C++14"
@@ -56,27 +62,10 @@ project "Catch2WithMain"
-- 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 "ProgmasoftCatch3"
- kind "StaticLib"
- language "C++"
- cppdialect "C++20"
- targetdir "build/premake/bin/%{cfg.buildcfg}"
- objdir "build/premake/obj/ProgmasoftCatch3/%{cfg.buildcfg}"
- files {
- "src/Progmasoft/ChoiceShrinker.cpp",
- "src/Progmasoft/Context.cpp",
- "src/Progmasoft/PropertyEngine.cpp",
- "src/Progmasoft/Snapshot.cpp",
- "src/Progmasoft/Catch3/**.hpp",
- "src/Progmasoft/Catch3.hpp",
- }
+ objdir "build/premake/obj/Catch3WithMain/%{cfg.buildcfg}"
+ files { "src/Progmasoft/Catch3/Internal/Main.cpp" }
includedirs { "src", generated_include }
- links { "Catch2" }
+ links { "Catch3" }
project "ProgmasoftPropertyTests"
kind "ConsoleApp"
@@ -101,4 +90,4 @@ project "ProgmasoftPropertyTests"
"src/Progmasoft/**.hpp",
}
includedirs { "src", generated_include }
- links { "ProgmasoftCatch3", "Catch2WithMain", "Catch2" }
+ links { "Catch3WithMain", "Catch3" }