Skip to content

Commit

Permalink
Add project to test buildaction "None".
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarod42 committed Dec 11, 2023
1 parent 5f51e9a commit 75178c7
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:|
Expand Down
4 changes: 4 additions & 0 deletions projects/project-buildaction_none/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## Project-buildaction_none:

Test [`buildaction`](https://premake.github.io/docs/buildaction) `"None"`.

24 changes: 24 additions & 0 deletions projects/project-buildaction_none/premake5.lua
Original file line number Diff line number Diff line change
@@ -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"
1 change: 1 addition & 0 deletions projects/project-buildaction_none/src/excluded.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#error "Should not be compiled" // buildaction "None"
3 changes: 3 additions & 0 deletions projects/project-buildaction_none/src/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
int main()
{
}

0 comments on commit 75178c7

Please sign in to comment.