diff --git a/CMakeLists.txt b/CMakeLists.txt index 774d46f06..4c375fb97 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,15 +63,15 @@ else() endif() # Check OS -# Use the switch NO_EVENTFD to deactivate eventfd usage indepentent of availability on OS -if(NOT ${NO_EVENTFD} MATCHES "1") - check_include_file("sys/eventfd.h" HAS_EVENTFD) -else() - set(HAS_EVENTFD 0) -endif() +check_include_file("sys/eventfd.h" HAS_EVENTFD) check_include_file("semaphore.h" HAS_SEMAPHORE) check_include_file("sys/mman.h" HAS_MMAN) +# Use the switch NO_EVENTFD to deactivate eventfd usage indepentent of availability on OS +if(${NO_EVENTFD}) + set(HAS_EVENTFD OFF) +endif() + # Check packages find_package(PkgConfig REQUIRED) find_package(Threads REQUIRED)