From 36f42dcae47bc71b425b8d23ccc95db7994bf7be Mon Sep 17 00:00:00 2001 From: Jarod42 Date: Mon, 11 Dec 2023 10:17:25 +0100 Subject: [PATCH] Add project to test `buildaction "None"`. --- Readme.md | 1 + projects/project-buildaction_none/Readme.md | 4 ++++ .../project-buildaction_none/premake5.lua | 24 +++++++++++++++++++ .../project-buildaction_none/src/excluded.cpp | 1 + .../project-buildaction_none/src/main.cpp | 3 +++ 5 files changed, 33 insertions(+) create mode 100644 projects/project-buildaction_none/Readme.md create mode 100644 projects/project-buildaction_none/premake5.lua create mode 100644 projects/project-buildaction_none/src/excluded.cpp create mode 100644 projects/project-buildaction_none/src/main.cpp diff --git a/Readme.md b/Readme.md index 5c75ee1..0f3590d 100644 --- a/Readme.md +++ b/Readme.md @@ -39,6 +39,7 @@ Sample projects for integration testing [premake4/premake5](https://premake.gith |custom build|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:[^codeblocks_custom_build][^codeblocks_fileconfig_per_config]|:heavy_check_mark: (Fixed)|:heavy_check_mark:|:x:| |custom rule|:x:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:x:|:heavy_check_mark:[^codeblocks_fileconfig_per_config]|:heavy_check_mark: (Fixed)|:heavy_check_mark:|:x:| |per-file config |:x:|:heavy_check_mark:|:x:|:x:|:x:|:x:|:x:[^codeblocks_fileconfig_per_config]|:x:|:heavy_check_mark:|:x:| +|`buildaction "None"` |:grey_question:|:grey_question:|:grey_question:|:grey_question:|:grey_question:|:grey_question:|:grey_question:|:grey_question:|:grey_question:|:grey_question:| |`flags {"ExcludeFromBuild"}` |:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:x:| |`toolset "clang"` |:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:grey_question:|:heavy_check_mark:|:grey_question:| |`toolset "gcc"` |:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:x:|:x:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:| diff --git a/projects/project-buildaction_none/Readme.md b/projects/project-buildaction_none/Readme.md new file mode 100644 index 0000000..00162e3 --- /dev/null +++ b/projects/project-buildaction_none/Readme.md @@ -0,0 +1,4 @@ +## Project-buildaction_none: + +Test [`buildaction`](https://premake.github.io/docs/buildaction) `"None"`. + diff --git a/projects/project-buildaction_none/premake5.lua b/projects/project-buildaction_none/premake5.lua new file mode 100644 index 0000000..3c86c5f --- /dev/null +++ b/projects/project-buildaction_none/premake5.lua @@ -0,0 +1,24 @@ +local Root = path.getabsolute(".") + +if (_ACTION == nil) then + return +end + +local LocationDir = path.join(Root, "solution", _ACTION) + +workspace "Project" + location(LocationDir) + configurations {"Debug", "Release"} + + objdir(path.join(LocationDir, "obj")) -- premake adds $(configName)/$(AppName) + targetdir(path.join(LocationDir, "bin/%{cfg.buildcfg}")) + targetname("app") + startproject "app" + +project "app" + kind "ConsoleApp" + + files {"src/main.cpp", "src/excluded.cpp"} + + filter { "files:src/excluded.cpp" } + buildaction "None" diff --git a/projects/project-buildaction_none/src/excluded.cpp b/projects/project-buildaction_none/src/excluded.cpp new file mode 100644 index 0000000..d950fe3 --- /dev/null +++ b/projects/project-buildaction_none/src/excluded.cpp @@ -0,0 +1 @@ +#error "Should not be compiled" // buildaction "None" diff --git a/projects/project-buildaction_none/src/main.cpp b/projects/project-buildaction_none/src/main.cpp new file mode 100644 index 0000000..71113bc --- /dev/null +++ b/projects/project-buildaction_none/src/main.cpp @@ -0,0 +1,3 @@ +int main() +{ +}