summaryrefslogtreecommitdiffstats
path: root/premake5.lua
diff options
context:
space:
mode:
authorDavid Siher <32305650+dsiher@users.noreply.github.com>2022-01-27 11:53:58 -0500
committerGitHub <noreply@github.com>2022-01-27 08:53:58 -0800
commit22f0c04d2b5f8245ccaee6caee8e5adebea4aea0 (patch)
tree4ab4b2089823f0b6b915bfed479d39468d7b83ad /premake5.lua
parent10470f8796de5b4fe48a83d50cda75a4188c06e3 (diff)
Update heterogeneous-hello-world to use gfx changes + delete shader.cpp (#2085)
* Update heterogeneous-hello-world to use gfx changes + delete shader.cpp * Remove "experimental feature" tag from premake * Add placeholder executeComputation_0() to shader.cpp * Add shader.cpp to heterogeneous-hello-world files in premake * Added project "heterogeneous-first-gen" to address first time build issues * Re-add "experimental feature" tag, clean up generated file structure Co-authored-by: jsmall-nvidia <jsmall@nvidia.com>
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.
--