aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDylan Noblesmith <nobled@dreamwidth.org>2012-02-27 21:19:56 +0000
committerDylan Noblesmith <nobled@dreamwidth.org>2012-03-03 13:16:50 +0000
commita4d8676d39eaa6c8d972498741944121babcb846 (patch)
tree112bcceeb3bb5ad608c29e915ad5e64290fb27bb /CMakeLists.txt
parent2cb512bd5dd2bb789d6a805aa800b4c92fae26ff (diff)
downloadpiglit-a4d8676d39eaa6c8d972498741944121babcb846.tar.gz
cmake: workaround cmake bug when GLUT is not found
Silences thousands of lines of spam. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42700
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7c31173e..d56fd8c3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,6 +13,20 @@ find_package(GLUT REQUIRED)
find_package(PNG REQUIRED)
find_package(X11)
+# The 'REQUIRED' above correctly produces an error for
+# OpenGL and PNG, but there's a bug involving FindGLUT.cmake
+# that fails to produce the error as of CMake 2.8.5.
+#
+# Instead, CMake keeps going and eventually spams
+# the console with a message for every target that used
+# e.g. the ${GLUT_INCLUDE_DIR} variable. So it
+# prints a line for basically every single test in piglit.
+#
+# Work around the bug and error out quickly here instead.
+if (NOT GLUT_FOUND)
+ message(FATAL_ERROR "GLUT library not found")
+endif()
+
# Check for presence of Python 2.6 or greater.
foreach(python_cmd python2 python)
execute_process(