diff --git a/test_conformance/compiler/test_build_options.cpp b/test_conformance/compiler/test_build_options.cpp index 52cb8eaa..15348e06 100644 --- a/test_conformance/compiler/test_build_options.cpp +++ b/test_conformance/compiler/test_build_options.cpp @@ -14,6 +14,7 @@ // limitations under the License. // #include "testBase.h" +#include "harness/kernelHelpers.h" #include "harness/os_helpers.h" #include "harness/testHarness.h" @@ -101,7 +102,10 @@ REGISTER_TEST(options_build_optimizations) continue; } - const char *option = optimization_option.first; + auto build_options = std::string("-cl-std=CL") + + get_max_OpenCL_C_for_context(context).to_string() + " " + + optimization_option.first; + const char *option = build_options.c_str(); clProgramWrapper program; error = create_single_kernel_helper_create_program( context, &program, 1, options_test_kernel, option); @@ -431,7 +435,10 @@ REGISTER_TEST(options_uniform_work_group_size) { return TEST_SKIPPED_ITSELF; } - const char *options = "-cl-uniform-work-group-size"; + std::string build_options = "-cl-std=CL" + + get_max_OpenCL_C_for_context(context).to_string() + + " -cl-uniform-work-group-size"; + const char *options = build_options.c_str(); clProgramWrapper program; int error = create_single_kernel_helper_create_program( context, &program, 1, options_test_kernel, options);