From f2ce04e9121bf19d82ac1c5d484fdc444d3b78db Mon Sep 17 00:00:00 2001 From: Jens Steube Date: Tue, 5 Dec 2017 14:14:36 +0100 Subject: [PATCH] Allow relative use of -I in build_opts --- src/opencl.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/opencl.c b/src/opencl.c index 97e32193a..d76a0a2dd 100644 --- a/src/opencl.c +++ b/src/opencl.c @@ -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 };