ninja-build / ninja

a small build system with a focus on speed
https://ninja-build.org/
Apache License 2.0
11.14k stars 1.59k forks source link

CMake build doesn't enable the use of ppoll on platforms that support it #1821

Open petrhosek opened 4 years ago

petrhosek commented 4 years ago

On platforms that support it, configure.py enables the use of ppoll by defining USE_PPOLL. CMake build doesn't replicate this logic which means that Ninja built with CMake is always going to use the less efficient pselect.

ghost commented 3 years ago

nothing complicated ...

just add a test if the header "poll.h" is present

if present add the definition -DHAVE_POLL_H and -DUSE_PPOLL

if You are not in a hurry I will fork and create a pull request

I can test on fedora33 and FreeBSD 13

season greetings

enrico

jhasse commented 3 years ago

@ghost PR would be very welcome :)