Skip to content

Commit

Permalink
Kernel include path fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
troky committed Jun 10, 2014
1 parent 6971ce6 commit fd35c77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ocl/build_kernel.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ static char *file_contents(const char *filename, int *length)
void set_base_compiler_options(build_kernel_data *data)
{
char buf[255];
sprintf(data->compiler_options, "-I \"%s\" -I \"%s\\kernel\" -I \".\" -D WORKSIZE=%d",
sprintf(data->compiler_options, "-I \"%s\" -I \"%s/kernel\" -I \".\" -D WORKSIZE=%d",
data->sgminer_path, data->sgminer_path, (int)data->work_size);
applog(LOG_DEBUG, "Setting worksize to %d", (int)(data->work_size));

Expand Down

3 comments on commit fd35c77

@mrbrdo
Copy link
Contributor

@mrbrdo mrbrdo commented on fd35c77 Jun 10, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Windows is fine with it? We could have a #define DIR_SEPARATOR "/", iirc it would work like "whatever" DIR_SEPARATOR "whatever".

@troky
Copy link
Contributor Author

@troky troky commented on fd35c77 Jun 10, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surprisingly, no problems in Windows. There is strcat(fullpath, "/kernel/"); in file_contents() that also works fine.

@mrbrdo
Copy link
Contributor

@mrbrdo mrbrdo commented on fd35c77 Jun 10, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonderful :) I remember that I've seen people use only 1 variant on both systems before (probably "/"). I wonder why the #ifdef / #else was there in the first place.

Please sign in to comment.