[Piglit] [PATCH] cmake: Check for linux/sync_file.h for egl_khr_fence_sync.

Vinson Lee vlee at freedesktop.org
Thu Jun 29 05:29:06 UTC 2017


Fixes: 2e423dd3f4ca ("egl_khr_fence_sync: Add sw_sync lib.")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101641
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 CMakeLists.txt                                     |    1 +
 .../spec/egl_khr_fence_sync/CMakeLists.gles2.txt   |    2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 90d056b..a24ddbc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -470,6 +470,7 @@ check_include_file(sys/resource.h  HAVE_SYS_RESOURCE_H)
 check_include_file(sys/stat.h  HAVE_SYS_STAT_H)
 check_include_file(unistd.h    HAVE_UNISTD_H)
 check_include_file(fcntl.h     HAVE_FCNTL_H)
+check_include_file(linux/sync_file.h HAVE_LINUX_SYNC_FILE_H)
 
 if(DEFINED PIGLIT_INSTALL_VERSION)
 	set(PIGLIT_INSTALL_VERSION_SUFFIX
diff --git a/tests/egl/spec/egl_khr_fence_sync/CMakeLists.gles2.txt b/tests/egl/spec/egl_khr_fence_sync/CMakeLists.gles2.txt
index c652e4c..550d694 100644
--- a/tests/egl/spec/egl_khr_fence_sync/CMakeLists.gles2.txt
+++ b/tests/egl/spec/egl_khr_fence_sync/CMakeLists.gles2.txt
@@ -4,6 +4,8 @@ if(PIGLIT_HAS_PTHREADS)
 	link_libraries(${CMAKE_THREAD_LIBS_INIT})
 endif()
 
+if(HAVE_LINUX_SYNC_FILE_H)
 piglit_add_executable(egl_khr_fence_sync egl_khr_fence_sync.c sw_sync.c)
+endif()
 
 # vim: ft=cmake:
-- 
1.7.1



More information about the Piglit mailing list