summaryrefslogtreecommitdiffstats
path: root/premake5.lua
diff options
context:
space:
mode:
Diffstat (limited to 'premake5.lua')
-rw-r--r--premake5.lua31
1 files changed, 20 insertions, 11 deletions
diff --git a/premake5.lua b/premake5.lua
index 69f18a5b4..e83d61728 100644
--- a/premake5.lua
+++ b/premake5.lua
@@ -151,14 +151,14 @@ newoption {
default = "true",
allowed = { { "true", "True"}, { "false", "False" } }
}
-
-newoption {
+
+ newoption {
trigger = "enable-experimental-projects",
description = "(Optional) If true include experimental projects in build.",
value = "bool",
default = "false",
allowed = { { "true", "True"}, { "false", "False" } }
- }
+ }
buildLocation = _OPTIONS["build-location"]
executeBinary = (_OPTIONS["execute-binary"] == "true")
@@ -679,21 +679,30 @@ newoption {
example "cpu-hello-world"
kind "ConsoleApp"
-
-if enableExperimental then
- -- TODO: Currently this project doesn't build on linux CI.
- -- Need to fix so that we don't check in shader.cpp, which changes
- -- everytime when it is generated on a different machine (contains absolute path)
+
+ if enableExperimental then
+ project "heterogeneous-first-gen"
+ kind "Utility"
+ links "slangc"
+ location("build/" .. slangUtil.getBuildLocationName(targetInfo) .. "/heterogeneous-hello-world")
+ prebuildcommands {
+ "\"%{wks.location:lower()}/bin/" .. targetName .. "/%{cfg.buildcfg:lower()}/slangc\" \"%{wks.location:lower()}/examples/heterogeneous-hello-world/shader.slang\" -o \"%{wks.location:lower()}/examples/heterogeneous-hello-world/shader.cpp\" -heterogeneous -target cpp -target hlsl"
+ }
+
example "heterogeneous-hello-world"
kind "ConsoleApp"
-- Additionally add slangc for compiling shader.cpp
- links { "example-base", "slang", "gfx", "gfx-util", "slangc", "platform", "core" }
+ links { "example-base", "slang", "gfx", "gfx-util", "slangc", "platform", "core", "heterogeneous-first-gen" }
-- Generate shader.cpp from shader.slang
- prebuildmessage ("Generating shader.cpp from shader.slang")
+ prebuildmessage "Generating shader.cpp in %{wks.location:lower()}/examples/heterogeneous-hello-world/"
prebuildcommands {
"\"%{wks.location:lower()}/bin/" .. targetName .. "/%{cfg.buildcfg:lower()}/slangc\" \"%{wks.location:lower()}/examples/heterogeneous-hello-world/shader.slang\" -o \"%{wks.location:lower()}/examples/heterogeneous-hello-world/shader.cpp\" -heterogeneous -target cpp -target hlsl"
}
-end
+ files {
+ "examples/heterogeneous-hello-world/shader.cpp"
+ }
+ end
+
-- Most of the other projects have more interesting configuration going
-- on, so let's walk through them in order of increasing complexity.
--