diff options
author | Chad Versace <chad.versace@linux.intel.com> | 2014-03-22 09:31:43 -0700 |
---|---|---|
committer | Chad Versace <chad.versace@linux.intel.com> | 2014-04-17 13:18:05 -0700 |
commit | 4e28f769a2bddaa2adeaedfc56d6a71edd2e2cd9 (patch) | |
tree | fdea7179026e4b011c1e9f864099cb712fd38dd2 /CMakeLists.txt | |
parent | 60c2be4c4018384c32006f9a539721d816a3636d (diff) |
cmake: Check for pthreads
Set PIGLIT_HAS_PTHREADS as a CMake variable and a cpp feature macro if
the systems has pthreads.
Future EGL_KHR_fence_sync tests will be multi-threaded.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index bef9c35b8..cbdccf165 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,7 @@ INCLUDE (FindPkgConfig) project (piglit) +find_package(Threads) find_package(X11) if(X11_FOUND) set(PIGLIT_HAS_X11 True) @@ -318,6 +319,11 @@ if(PIGLIT_HAS_POSIX_CLOCK_MONOTONIC) add_definitions(-DPIGLIT_HAS_POSIX_CLOCK_MONOTONIC) endif() +if(CMAKE_USE_PTHREADS_INIT) + set(PIGLIT_HAS_PTHREADS true) + add_definitions(-DPIGLIT_HAS_PTHREADS) +endif() + if(PIGLIT_USE_WAFFLE AND ${CMAKE_SYSTEM_NAME} STREQUAL "Linux") pkg_check_modules(EGL egl) endif() |