summaryrefslogtreecommitdiffstats
path: root/tools/slang-test/options.cpp
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2019-04-23 17:19:20 -0400
committerGitHub <noreply@github.com>2019-04-23 17:19:20 -0400
commit9cb75371f5ea45640ae0e3998eb27bcda0a22cd9 (patch)
tree8e4c18099888d88860c54c0a23c5fe345f3fd4b7 /tools/slang-test/options.cpp
parent7a71b86aadda83d16dadf809be137c7551f31464 (diff)
Feature/premake build (#951)
* * Remove Makefile * Document how to create build using premake5 * Added support for finding the executable path * If binDir not set on command line use the executable path * Fix getting exe path on linux. * Removed CalcExecutablePath from Path:: interface, made implementation internal. * Documentation improvements. * Fixes based on review * Fix some typos * Removed unused/needed global
Diffstat (limited to 'tools/slang-test/options.cpp')
-rw-r--r--tools/slang-test/options.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/slang-test/options.cpp b/tools/slang-test/options.cpp
index 2b9ec6c06..693d1939c 100644
--- a/tools/slang-test/options.cpp
+++ b/tools/slang-test/options.cpp
@@ -291,5 +291,15 @@ static bool _isSubCommand(const char* arg)
return SLANG_FAIL;
}
+ if (optionsOut->binDir.Length() == 0)
+ {
+ // If the binDir isn't set try using the path to the executable
+ String exePath = Path::GetExecutablePath();
+ if (exePath.Length())
+ {
+ optionsOut->binDir = Path::GetDirectoryName(exePath);
+ }
+ }
+
return SLANG_OK;
}