summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorChad Versace <chad.versace@linux.intel.com>2012-09-22 16:33:42 +0200
committerChad Versace <chad.versace@linux.intel.com>2012-10-09 19:08:30 -0700
commitd39eca2b85d60540d6099150ca1eea9c14afef23 (patch)
tree920bf62953617fe8c3ec121e39ca9903f068e17f /cmake
parent074a6d54f5a7fa4c88a31f826ee517b4601b1e61 (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 'cmake')
-rw-r--r--cmake/target_api/CMakeLists.txt12
-rw-r--r--cmake/target_api/gl/CMakeLists.txt10
-rw-r--r--cmake/target_api/gles1/CMakeLists.txt2
-rw-r--r--cmake/target_api/gles2/CMakeLists.txt2
4 files changed, 13 insertions, 13 deletions
diff --git a/cmake/target_api/CMakeLists.txt b/cmake/target_api/CMakeLists.txt
index d3e23f9ff..c5e0b904f 100644
--- a/cmake/target_api/CMakeLists.txt
+++ b/cmake/target_api/CMakeLists.txt
@@ -25,14 +25,14 @@ add_subdirectory(no_api)
add_subdirectory(gl)
-if(BUILD_GLES1_TESTS)
+if(PIGLIT_BUILD_GLES1_TESTS)
add_subdirectory(gles1)
-endif(BUILD_GLES1_TESTS)
+endif(PIGLIT_BUILD_GLES1_TESTS)
-if(BUILD_GLES2_TESTS)
+if(PIGLIT_BUILD_GLES2_TESTS)
add_subdirectory(gles2)
-endif(BUILD_GLES2_TESTS)
+endif(PIGLIT_BUILD_GLES2_TESTS)
-if(BUILD_CL_TESTS)
+if(PIGLIT_BUILD_CL_TESTS)
add_subdirectory(cl)
-endif(BUILD_CL_TESTS)
+endif(PIGLIT_BUILD_CL_TESTS)
diff --git a/cmake/target_api/gl/CMakeLists.txt b/cmake/target_api/gl/CMakeLists.txt
index ae67020d3..b13229de4 100644
--- a/cmake/target_api/gl/CMakeLists.txt
+++ b/cmake/target_api/gl/CMakeLists.txt
@@ -1,19 +1,19 @@
set(piglit_target_api "gl")
add_definitions(
- -DUSE_OPENGL
+ -DPIGLIT_USE_OPENGL
)
-if(USE_WAFFLE)
+if(PIGLIT_USE_WAFFLE)
link_libraries(glut_waffle)
-else(USE_WAFFLE)
- add_definitions(-DUSE_GLUT)
+else(PIGLIT_USE_WAFFLE)
+ add_definitions(-DPIGLIT_USE_GLUT)
include_directories(
${GLUT_INCLUDE_DIR}
)
link_libraries(
${GLUT_glut_LIBRARY}
)
-endif(USE_WAFFLE)
+endif(PIGLIT_USE_WAFFLE)
add_subdirectory(${piglit_SOURCE_DIR}/tests
${piglit_BINARY_DIR}/target_api/${piglit_target_api}/tests
diff --git a/cmake/target_api/gles1/CMakeLists.txt b/cmake/target_api/gles1/CMakeLists.txt
index 02ca906ad..b76d51bd6 100644
--- a/cmake/target_api/gles1/CMakeLists.txt
+++ b/cmake/target_api/gles1/CMakeLists.txt
@@ -1,7 +1,7 @@
set(piglit_target_api "gles1")
add_definitions(
- -DUSE_OPENGL_ES1
+ -DPIGLIT_USE_OPENGL_ES1
)
link_libraries(glut_waffle)
add_subdirectory(${piglit_SOURCE_DIR}/tests
diff --git a/cmake/target_api/gles2/CMakeLists.txt b/cmake/target_api/gles2/CMakeLists.txt
index 4dcfd175c..b8cad2055 100644
--- a/cmake/target_api/gles2/CMakeLists.txt
+++ b/cmake/target_api/gles2/CMakeLists.txt
@@ -1,7 +1,7 @@
set(piglit_target_api "gles2")
add_definitions(
- -DUSE_OPENGL_ES2
+ -DPIGLIT_USE_OPENGL_ES2
)
link_libraries(glut_waffle)
add_subdirectory(${piglit_SOURCE_DIR}/tests