Skip to content

Commit

Permalink
Set _GNU_SOURCE when checking for sched_setaffinity
Browse files Browse the repository at this point in the history
This needs to be defined otherwise sched_setaffinity will never be
found.
  • Loading branch information
ddn0 committed Jan 31, 2020
1 parent bb13147 commit a6b243b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cmake/Modules/CheckSchedSetAffinity.cmake
Expand Up @@ -3,6 +3,7 @@ include(CheckSymbolExists)
if(SCHED_SETAFFINITY_FOUND)

else()
set(CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
CHECK_SYMBOL_EXISTS(sched_setaffinity sched.h HAVE_SCHED_SETAFFINITY_INTERNAL)
if(HAVE_SCHED_SETAFFINITY_INTERNAL)
message(STATUS "sched_setaffinity found")
Expand Down

0 comments on commit a6b243b

Please sign in to comment.