From 9cb75371f5ea45640ae0e3998eb27bcda0a22cd9 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 23 Apr 2019 17:19:20 -0400 Subject: 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 --- tools/slang-test/options.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tools/slang-test/options.cpp') 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; } -- cgit v1.2.3