Explorar o código

Fix build with OpenGL and without CUDA

Samuel Thibault %!s(int64=11) %!d(string=hai) anos
pai
achega
5f52c015d5
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      examples/gl_interop/gl_interop_idle.c

+ 4 - 1
examples/gl_interop/gl_interop_idle.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2012 Université de Bordeaux 1
+ * Copyright (C) 2012-2013 Université de Bordeaux 1
  *
  * 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
@@ -29,6 +29,8 @@
 
 #include <starpu.h>
 #include <unistd.h>
+
+#if (defined(STARPU_USE_CUDA) && defined(STARPU_OPENGL_RENDER))
 #include <GL/glut.h>
 
 void dummy(void *buffers[], void *cl_arg)
@@ -89,6 +91,7 @@ static void idle(void)
 {
 	starpu_driver_run_once(&drivers[0]);
 }
+#endif
 
 int main(int argc, char **argv)
 {