Browse Source

src/drivers/opencl/driver_opencl_utils.c: first look for opencl source files in source directory and if not found in installation directory

Nathalie Furmento 10 years ago
parent
commit
cea4b29ed5
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/drivers/opencl/driver_opencl_utils.c

+ 3 - 3
src/drivers/opencl/driver_opencl_utils.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2014  Centre National de la Recherche Scientifique
  * Copyright (C) 2010-2014  Université de Bordeaux 1
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -64,7 +64,7 @@ int _starpu_opencl_locate_file(const char *source_file_name, char *located_file_
 
 	if (ret == EXIT_FAILURE)
 	{
-		sprintf(located_file_name, "%s/%s", _STARPU_STRINGIFY(STARPU_OPENCL_DATADIR), source_file_name);
+		sprintf(located_file_name, "%s/%s", STARPU_SRC_DIR, source_file_name);
 		_STARPU_DEBUG("Trying to locate <%s>\n", located_file_name);
 		if (access(located_file_name, R_OK) == 0)
 			ret = EXIT_SUCCESS;
@@ -72,7 +72,7 @@ int _starpu_opencl_locate_file(const char *source_file_name, char *located_file_
 
 	if (ret == EXIT_FAILURE)
 	{
-		sprintf(located_file_name, "%s/%s", STARPU_SRC_DIR, source_file_name);
+		sprintf(located_file_name, "%s/%s", _STARPU_STRINGIFY(STARPU_OPENCL_DATADIR), source_file_name);
 		_STARPU_DEBUG("Trying to locate <%s>\n", located_file_name);
 		if (access(located_file_name, R_OK) == 0)
 			ret = EXIT_SUCCESS;