Browse Source

handle NULL OpenCL build options

Samuel Thibault 12 years ago
parent
commit
fc407c8e48
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/drivers/opencl/driver_opencl_utils.c

+ 4 - 1
src/drivers/opencl/driver_opencl_utils.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
  * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
  * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
- * Copyright (C) 2010, 2011  Université de Bordeaux 1
+ * Copyright (C) 2010-2012  Université de Bordeaux 1
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
  * it under the terms of the GNU Lesser General Public License as published by
@@ -365,6 +365,9 @@ int _starpu_opencl_compile_or_load_opencl_from_file(const char *source_file_name
 
 
 	starpu_opencl_load_program_source(source_file_name, located_file_name, located_dir_name, opencl_program_source);
 	starpu_opencl_load_program_source(source_file_name, located_file_name, located_dir_name, opencl_program_source);
 
 
+	if (!build_options)
+		build_options = "";
+
 	if (!strcmp(located_dir_name, ""))
 	if (!strcmp(located_dir_name, ""))
 		strcpy(new_build_options, build_options);
 		strcpy(new_build_options, build_options);
 	else if (build_options)
 	else if (build_options)