clang: Unknown command line argument

I am modifying the convolution separable source code given by NVIDIA OpenCL SDK in order to be used in 3 dimensional space.

Macros and compile options are originally defined before modification,

#define KERNEL_RADIUS 8

static const cl_uint
ROWS_BLOCKDIM_X = 16, COLUMNS_BLOCKDIM_X = 16,
ROWS_BLOCKDIM_Y = 16, COLUMNS_BLOCKDIM_Y = 16,
ROWS_RESULT_STEPS = 8, COLUMNS_RESULT_STEPS = 8,
ROWS_HALO_STEPS = 1, COLUMNS_HALO_STEPS = 1;

char compileOptions[2048];
sprintf_s(compileOptions, 2048, "
-cl-fast-relaxed-math
-D KERNEL_RADIUS=%u
-D ROWS_BLOCKDIM_X=%u -D COLUMNS_BLOCKDIM_X=%u
-D ROWS_BLOCKDIM_Y=%u -D COLUMNS_BLOCKDIM_Y=%u
-D ROWS_RESULT_STEPS=%u -D COLUMNS_RESULT_STEPS=%u
-D ROWS_HALO_STEPS=%u -D COLUMNS_HALO_STEPS=%u
",
KERNEL_RADIUS,
ROWS_BLOCKDIM_X, COLUMNS_BLOCKDIM_X,
ROWS_BLOCKDIM_Y, COLUMNS_BLOCKDIM_Y,
ROWS_RESULT_STEPS, COLUMNS_RESULT_STEPS,
ROWS_HALO_STEPS, COLUMNS_HALO_STEPS
);

And I changed above into followings in three dimensional,

#define KERNEL_RADIUS 8

static const cl_uint
ROWS_BLOCKDIM_X = 16, COLUMNS_BLOCKDIM_X = 16, SLICES_BLOCKDIM_X = 16,
ROWS_BLOCKDIM_Y = 16, COLUMNS_BLOCKDIM_Y = 16, SLICES_BLOCKDIM_Y = 1,
ROWS_BLOCKDIM_Z = 1, COLUMNS_BLOCKDIM_Z = 1, SLICES_BLOCKDIM_Z = 16,
ROWS_RESULT_STEPS = 8, COLUMNS_RESULT_STEPS = 8, SLICES_RESULT_STEPS = 8,
ROWS_HALO_STEPS = 1, COLUMNS_HALO_STEPS = 1, SLICES_HALO_STEPS = 1;

char compileOptions[2048];
sprintf_s(compileOptions, 2048, "-cl-fast-relaxed-math -D KERNEL_RADIUS=%u
-D ROWS_BLOCKDIM_X=%u -D COLUMNS_BLOCKDIM_X=%u -D SLICES_BLOCKDIM_X=%u
-D ROWS_BLOCKDIM_Y=%u -D COLUMNS_BLOCKDIM_Y=%u -D SLICES_BLOCKDIM_Y=%u
-D ROWS_BLOCKDIM_Z=%u -D COLUMNS_BLOCKDIM_Z=%u -D SLICES_BLOCKDIM_Z=%u
-D ROWS_RESULT_STEPS=%u -D COLUMNS_RESULT_STEPS=%u -D SLICES_RESULT_STEPS=%u
-D ROWS_HALO_STEPS=%u -D COLUMNS_HALO_STEPS=%u -D SLICES_HALO_STEPS=%u
",
KERNEL_RADIUS,
ROWS_BLOCKDIM_X, COLUMNS_BLOCKDIM_X, SLICES_BLOCKDIM_X,
ROWS_BLOCKDIM_Y, COLUMNS_BLOCKDIM_Y, SLICES_BLOCKDIM_Y,
ROWS_BLOCKDIM_Z, COLUMNS_BLOCKDIM_Z, SLICES_BLOCKDIM_Z,
ROWS_RESULT_STEPS, COLUMNS_RESULT_STEPS, SLICES_RESULT_STEPS,
ROWS_HALO_STEPS, COLUMNS_HALO_STEPS, SLICES_HALO_STEPS
);

However, when I build above modified program, I got an error message that I can not resolve,

ciErrNum = clBuildProgram(cpConvolutionSeparable, 0, NULL, compileOptions, NULL, NULL);
error message:
"clang: Unknown command line argument ‘ROWS_BLOCKDIM_Z=1’. Try:‘clang --help’

All macros are reflected on the kernel and it seems there is not syntax error.
Is anybody who already concerned about this problem? I need a help.

Thank you. The problem is solved.

I used the other way such that the macro parts are moved to the head of .cl file as “#define ~”.
And only the math intrinsic option is input to the option argument of buildprogram like below.
char* flags = “-cl-fast-relaxed-math”;
ciErrNum = clBuildProgram(cpConvolutionSeparable, 0, NULL, flags, NULL, NULL);