llvm/cmake
Michal Gorny 39b10e911b [Support] Provide linux/magic.h fallback for older kernels
The function for distinguishing local and remote files added in r295768
unconditionally uses linux/magic.h header to provide necessary
filesystem magic numbers. However, in kernel headers predating 2.6.18
the magic numbers are spread throughout multiple include files.
Furthermore, LLVM did not require kernel headers being installed so far.

To increase the portability across different versions of Linux kernel
and different Linux systems, add CMake header checks for linux/magic.h
and -- if it is missing -- the linux/nfs_fs.h and linux/smb.h headers
which contained the numbers previously.

Furthermore, since the numbers are static and the feature does not seem
critical enough to make LLVM require kernel headers at all, add fallback
constants for the case when none of the necessary headers is available.

Differential Revision: https://reviews.llvm.org/D30261

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295854 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-22 18:09:15 +00:00
..
modules [CMake] Support externalizing debug info on non-Darwin platforms 2017-02-17 19:29:12 +00:00
platforms [CMake] Add variable IOS to iOS toolchain 2017-02-17 01:11:41 +00:00
config-ix.cmake [Support] Provide linux/magic.h fallback for older kernels 2017-02-22 18:09:15 +00:00
config.guess [CMAKE] Update build on recent Haiku 2016-02-26 17:01:45 +00:00
dummy.cpp [CMake] Fix Xcode build with LLVM_ENABLE_OBJLIB. 2015-09-10 17:18:51 +00:00
nsis_icon.ico Win installer: provide a pretty icon 2014-03-27 20:48:37 +00:00
nsis_logo.bmp CMake: polish the Windows packaging rules 2013-08-15 23:44:31 +00:00
README CMake: Added notes pointing to the LLVM CMake documentation. 2009-04-04 22:52:02 +00:00

See docs/CMake.html for instructions on how to build LLVM with CMake.