summaryrefslogtreecommitdiffstats
path: root/premake5.lua
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2021-10-21 15:51:18 -0700
committerGitHub <noreply@github.com>2021-10-21 15:51:18 -0700
commit9304c2d04c9bfbae33cc328d404b24aba375aa4f (patch)
tree88473d2ca0b03341f84bca17b359ae45c4becfaa /premake5.lua
parent66e319e34b99eff0a8d27be524ab4a831437ac1b (diff)
Diagnostic for no type conformance + bug fix. (#1985)
* Diagnostic for no type conformance + bug fix. * Fixes. * Fix. * Include heterogeneous example only with --enable-experimental-projects premake flag Co-authored-by: Yong He <yhe@nvidia.com> Co-authored-by: jsmall-nvidia <jsmall@nvidia.com>
Diffstat (limited to 'premake5.lua')
-rw-r--r--premake5.lua34
1 files changed, 23 insertions, 11 deletions
diff --git a/premake5.lua b/premake5.lua
index 2643a1b6c..57658d6d7 100644
--- a/premake5.lua
+++ b/premake5.lua
@@ -152,6 +152,14 @@ newoption {
allowed = { { "true", "True"}, { "false", "False" } }
}
+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")
buildGlslang = (_OPTIONS["build-glslang"] == "true")
@@ -162,7 +170,7 @@ newoption {
enableProfile = (_OPTIONS["enable-profile"] == "true")
enableEmbedStdLib = (_OPTIONS["enable-embed-stdlib"] == "true")
enableXlib = (_OPTIONS["enable-xlib"] == "true")
-
+ enableExperimental = (_OPTIONS["enable-experimental-projects"] == "true")
-- Determine the target info
targetInfo = slangUtil.getTargetInfo()
@@ -672,16 +680,20 @@ newoption {
example "cpu-hello-world"
kind "ConsoleApp"
- example "heterogeneous-hello-world"
- kind "ConsoleApp"
- -- Additionally add slangc for compiling shader.cpp
- links { "example-base", "slang", "gfx", "gfx-util", "slangc", "platform", "core" }
- -- Generate shader.cpp from shader.slang
- prebuildmessage ("Generating shader.cpp from shader.slang")
- 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"
- }
-
+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)
+ example "heterogeneous-hello-world"
+ kind "ConsoleApp"
+ -- Additionally add slangc for compiling shader.cpp
+ links { "example-base", "slang", "gfx", "gfx-util", "slangc", "platform", "core" }
+ -- Generate shader.cpp from shader.slang
+ prebuildmessage ("Generating shader.cpp from shader.slang")
+ 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
-- Most of the other projects have more interesting configuration going
-- on, so let's walk through them in order of increasing complexity.
--