use specific osx flags for pch
Summary
Building pch sometimes fails (not always, and there is no reasons sometimes it works..) because some system headers (unistd.h
) are not found, because the -isysroot
flag are not passed to the compile command line.
Steps to reproduce
Use a clean macOS 10.14 (Mojave) with no previous SDK installed (with no /usr/include directory
!). Ask @eharquel or @mschweitzer to provide you one ;-)
Dev environment
- OS: MacOS
- CMake version: 3.12.2
- Compiler: clang-1000.11.45.5
- Build type: NR
- Commit: NR
What is the current bug behavior?
Build errors, one of them complaining unistd.h
is missing
What is the expected correct behavior?
Successful build
Possible fixes
Pass the correct -isysroot
flag when building pch