1
mirror of https://github.com/hashcat/hashcat synced 2024-11-13 17:28:58 +01:00

Allow relative use of -I in build_opts

This commit is contained in:
Jens Steube 2017-12-05 14:14:36 +01:00
parent 1184ae1cdd
commit f2ce04e912

View File

@ -4212,14 +4212,6 @@ int opencl_session_begin (hashcat_ctx_t *hashcat_ctx)
return -1;
}
char build_opts[1024] = { 0 };
#if defined (_WIN)
snprintf (build_opts, sizeof (build_opts) - 1, "-I \"%s\"", folder_config->cpath_real);
#else
snprintf (build_opts, sizeof (build_opts) - 1, "-I %s", folder_config->cpath_real);
#endif
// include check
// this test needs to be done manually because of macOS opencl runtime
// if there's a problem with permission, its not reporting back and erroring out silently
@ -4274,6 +4266,14 @@ int opencl_session_begin (hashcat_ctx_t *hashcat_ctx)
}
#endif
char build_opts[1024] = { 0 };
#if defined (_WIN)
snprintf (build_opts, sizeof (build_opts) - 1, "-I OpenCL -I \"%s\"", folder_config->cpath_real);
#else
snprintf (build_opts, sizeof (build_opts) - 1, "-I OpenCL -I %s", folder_config->cpath_real);
#endif
// we don't have sm_* on vendors not NV but it doesn't matter
char build_opts_new[1024] = { 0 };