diff options
author | Chad Versace <chad.versace@linux.intel.com> | 2012-09-22 16:33:42 +0200 |
---|---|---|
committer | Chad Versace <chad.versace@linux.intel.com> | 2012-10-09 19:08:30 -0700 |
commit | d39eca2b85d60540d6099150ca1eea9c14afef23 (patch) | |
tree | 920bf62953617fe8c3ec121e39ca9903f068e17f /src | |
parent | 074a6d54f5a7fa4c88a31f826ee517b4601b1e61 (diff) |
cmake: Prefix cmake options and feature macros with PIGLIT
Some cmake options and features macros had form USE_${feature}, others
BUILD_${category}_TESTS. This patch consistently prefixes all such options
and macros with PIGLIT.
Piglit, be a good code citizen. Namespace your variables.
This patch was created with
find . -type f | xargs sed -i \
-e 's/\(^\|[^_]\)\(USE_\(GLX\|GLUT\|WAFFLE\|OPENGL\|OPENGL_ES1\|OPENGL_ES2\)\)\($\|[^_]\)/\1PIGLIT_\2\4/g' \
-e 's/\(^\|[^_]\)\(BUILD_\(CL\|GLX\|GLES1\|GLES2\)_TESTS\)\($\|[^_]\)/\1PIGLIT_\2\4/g' \
Reviewed-and-tested-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Paul Berry <stereotype441@gmail.com>
Acked-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/piglit/gl_wrap.h | 8 | ||||
-rw-r--r-- | src/piglit/glut_wrap.h | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f1ba7c252..2cca584e0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,3 +1,3 @@ -if(USE_WAFFLE) +if(PIGLIT_USE_WAFFLE) add_subdirectory(glut_waffle) -endif(USE_WAFFLE) +endif(PIGLIT_USE_WAFFLE) diff --git a/src/piglit/gl_wrap.h b/src/piglit/gl_wrap.h index 3ccc36581..7f646cb30 100644 --- a/src/piglit/gl_wrap.h +++ b/src/piglit/gl_wrap.h @@ -29,7 +29,7 @@ * \brief Convenience header that includes the actual OpenGL headers. * * The actual OpenGL headers are chosen according to the macro definitions - * USE_OPENGL, USE_OPENGL_ES1, and USE_OPENGL_ES2. + * PIGLIT_USE_OPENGL, PIGLIT_USE_OPENGL_ES1, and PIGLIT_USE_OPENGL_ES2. */ #pragma once @@ -42,10 +42,10 @@ extern "C" { #include <windows.h> #endif -#if defined(USE_OPENGL) +#if defined(PIGLIT_USE_OPENGL) # include "piglit-dispatch.h" -#elif defined(USE_OPENGL_ES1) +#elif defined(PIGLIT_USE_OPENGL_ES1) # include <GLES/gl.h> # include <GLES/glext.h> @@ -57,7 +57,7 @@ extern "C" { # define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES # define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES -#elif defined(USE_OPENGL_ES2) +#elif defined(PIGLIT_USE_OPENGL_ES2) # include <GLES2/gl2.h> # include <GLES2/gl2ext.h> #endif diff --git a/src/piglit/glut_wrap.h b/src/piglit/glut_wrap.h index a1bddc3d2..549059daf 100644 --- a/src/piglit/glut_wrap.h +++ b/src/piglit/glut_wrap.h @@ -29,7 +29,7 @@ * \brief Convenience header that includes the actual GLUT headers. * * The actual GLUT headers are chosen according to the macro definitions - * USE_GLUT and USE_WAFFLE. + * PIGLIT_USE_GLUT and PIGLIT_USE_WAFFLE. */ #pragma once @@ -42,9 +42,9 @@ extern "C" { #include <windows.h> #endif -#if defined(USE_WAFFLE) +#if defined(PIGLIT_USE_WAFFLE) # include <glut_waffle/glut_waffle.h> -#elif defined(USE_GLUT) +#elif defined(PIGLIT_USE_GLUT) # ifdef __APPLE__ # include <GLUT/glut.h> |