mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Temporary WA for getcwd
Change-Id: Icf480eda830210dfff505a040cb2a3b0d6a78f67
This commit is contained in:
committed by
sys_ocldev
parent
bd9ac40bab
commit
541ea73e19
@@ -32,6 +32,7 @@ const char *fSeparator = "\\";
|
||||
#elif defined(__linux__)
|
||||
const char *fSeparator = "/";
|
||||
#endif
|
||||
std::string cwd;
|
||||
|
||||
Environment *gEnvironment;
|
||||
|
||||
@@ -42,13 +43,19 @@ std::string getRunPath() {
|
||||
#if defined(__linux__)
|
||||
res = getcwd(nullptr, 0);
|
||||
#else
|
||||
res = _getcwd(nullptr, 0);
|
||||
res = cwd;
|
||||
#endif
|
||||
return res;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int retVal = 0;
|
||||
std::string execPath(argv[0]);
|
||||
char separator = '/';
|
||||
if (execPath.find_last_of("\\") != std::string::npos)
|
||||
separator = '\\';
|
||||
cwd = execPath.substr(0, execPath.find_last_of(separator));
|
||||
|
||||
bool useDefaultListener = false;
|
||||
std::string devicePrefix("skl");
|
||||
std::string familyNameWithType("Gen9core");
|
||||
|
||||
Reference in New Issue
Block a user