[poppler] ConfigureChecks.cmake test/CMakeLists.txt

Albert Astals Cid aacid at kemper.freedesktop.org
Sun Feb 21 09:01:43 PST 2010


 ConfigureChecks.cmake |    5 +++++
 test/CMakeLists.txt   |   17 +++++++++++------
 2 files changed, 16 insertions(+), 6 deletions(-)

New commits:
commit fa0989297e95b6adebed71336ea206d1b279ab24
Author: Albert Astals Cid <aacid at kde.org>
Date:   Sun Feb 21 16:59:57 2010 +0000

    Detect the need for nanosleep in solaris
    
    Fixes bug 26650

diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 6049c9a..04de970 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -49,3 +49,8 @@ check_for_dir("dirent.h" HAVE_DIRENT_H)
 check_for_dir("ndir.h" HAVE_NDIR_H)
 check_for_dir("sys/dir.h" HAVE_SYS_DIR_H)
 check_for_dir("sys/ndir.h" HAVE_SYS_NDIR_H)
+
+check_function_exists("nanosleep" HAVE_NANOSLEEP)
+if(NOT HAVE_NANOSLEEP)
+  check_library_exists("rt" "nanosleep" "" LIB_RT_HAS_NANOSLEEP)
+endif(NOT HAVE_NANOSLEEP)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 2c6ec36..eada899 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,12 +1,17 @@
 
 if (ENABLE_SPLASH)
 
-  set (perf_test_SRCS
-    perf-test.cc
-    perf-test-preview-dummy.cc
-  )
-  add_executable(perf-test ${perf_test_SRCS})
-  target_link_libraries(perf-test poppler)
+  if (HAVE_NANOSLEEP OR LIB_RT_HAS_NANOSLEEP)
+    set (perf_test_SRCS
+      perf-test.cc
+      perf-test-preview-dummy.cc
+    )
+    add_executable(perf-test ${perf_test_SRCS})
+    target_link_libraries(perf-test poppler)
+    if (LIB_RT_HAS_NANOSLEEP)
+      target_link_libraries(perf-test rt)
+    endif (LIB_RT_HAS_NANOSLEEP)
+  endif (HAVE_NANOSLEEP OR LIB_RT_HAS_NANOSLEEP)
 
 endif (ENABLE_SPLASH)
 


More information about the poppler mailing list