mirror of
https://github.com/facebook/sapling.git
synced 2024-10-05 06:18:07 +03:00
367dce62df
Summary: Update FindGflags.cmake to work on recent CentOS and RedHat distributions. On these distributions the CMake package configuration installed by the gflags-devel RPM is slightly broken, and sets `gflags_INCLUDE_DIR` to a directory that does not exist. This happens because `/lib64` is symlinked to `/usr/lib64`, and CMake ends up searching `/lib64` before `/usr/lib64` by default when searching for packages. Therefore it finds `gflags-config.cmake` via the `/lib64` symlink. However, `gflags-config.cmake` computes the include directory relative to where its config file was found, and this relative path computation only works when using the actual `/usr/lib64` path where it was installed. When found via `/lib64` it returns a bogus `//include` path that does not exist. This updates `FindGflags.cmake` to verify if the `gflags_INCLUDE_DIR` path actually exists, and set it to a sane location instead. This also updates the code to use the `gflags-shared` target that is exported by the default gflags package configuration if it was only built as a shared library. Pull Request resolved: https://github.com/facebook/folly/pull/1409 Reviewed By: yfeldblum Differential Revision: D23588288 fbshipit-source-id: b68a717953ae0521f568d7bcfd05ca33cd6dc578 |
||
---|---|---|
.. | ||
fb_py_test_main.py | ||
fb_py_win_main.c | ||
FBBuildOptions.cmake | ||
FBCMakeParseArgs.cmake | ||
FBCompilerSettings.cmake | ||
FBCompilerSettingsMSVC.cmake | ||
FBCompilerSettingsUnix.cmake | ||
FBPythonBinary.cmake | ||
FBPythonTestAddTests.cmake | ||
FBThriftCppLibrary.cmake | ||
FBThriftLibrary.cmake | ||
FBThriftPyLibrary.cmake | ||
FindGflags.cmake | ||
FindGlog.cmake | ||
FindGMock.cmake | ||
FindLibEvent.cmake | ||
FindLibUnwind.cmake | ||
FindPCRE.cmake | ||
FindRe2.cmake | ||
make_fbpy_archive.py |