summaryrefslogtreecommitdiffstats
path: root/ConfigureChecks.cmake
diff options
context:
space:
mode:
authorsamelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-17 17:01:57 +0000
committersamelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-17 17:01:57 +0000
commit65e9d3ec365628b93a0da846f27259d8e6ad85fe (patch)
tree09c72eb2e82a6418d583b6c2303eda984137634f /ConfigureChecks.cmake
parentc36e31eb1b45088e320d6262f9f23771f6fa8f6f (diff)
downloadamarok-65e9d3ec365628b93a0da846f27259d8e6ad85fe.tar.gz
amarok-65e9d3ec365628b93a0da846f27259d8e6ad85fe.zip
[applications/amarok] sched_setaffinity buggy glibc check
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/amarok@1215101 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r--ConfigureChecks.cmake30
1 files changed, 30 insertions, 0 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 15729b8f..6f2191f3 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -19,6 +19,36 @@ check_include_file( linux/inotify.h HAVE_INOTIFY )
check_function_exists( statvfs HAVE_STATVFS )
+# sched_setaffinity buggy glibc check
+check_c_source_compiles("
+ #define _GNU_SOURCE
+ #include <sched.h>
+ int main() {
+ cpu_set_t mask;
+ CPU_ZERO(&mask);
+ CPU_SET(0, &mask);
+ sched_setaffinity(0, sizeof(mask), &mask);
+ return 0;
+ } "
+ SCHEDAFFINITY_3PARAMS )
+
+if( SCHEDAFFINITY_3PARAMS )
+ set( SCHEDAFFINITY_SUPPORT 1 )
+else( )
+ check_c_source_compiles("
+ #define _GNU_SOURCE
+ #include <sched.h>
+ int main() {
+ cpu_set_t mask;
+ CPU_ZERO(&mask);
+ CPU_SET(0, &mask);
+ sched_setaffinity(0, &mask);
+ return 0;
+ } "
+ SCHEDAFFINITY_SUPPORT )
+endif( )
+
+
# fabsf
tde_save( CMAKE_REQUIRED_LIBRARIES )
set( CMAKE_REQUIRED_LIBRARIES m )