sapling/build/fbcode_builder/CMake
Adam Simpkins 367dce62df update FindGflags.cmake to work on CentOS 8.x (#1409)
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
2020-09-09 12:44:54 -07:00
..
fb_py_test_main.py Fix bug in optimizing module loader for coverage collection 2020-04-02 02:42:33 -07:00
fb_py_win_main.c return returncode correctly 2020-08-31 16:26:46 -07:00
FBBuildOptions.cmake fbcode_builder: add a license header to FBBuildOptions.cmake 2019-09-16 15:41:57 -07:00
FBCMakeParseArgs.cmake fbcode_builder: CMake functions for building standalone python programs 2019-08-19 11:08:34 -07:00
FBCompilerSettings.cmake getdeps: silence inherits via dominance warnings 2020-05-08 21:46:06 -07:00
FBCompilerSettingsMSVC.cmake getdeps: silence inherits via dominance warnings 2020-05-08 21:46:06 -07:00
FBCompilerSettingsUnix.cmake getdeps: silence inherits via dominance warnings 2020-05-08 21:46:06 -07:00
FBPythonBinary.cmake getdeps: add an install_fb_python_executable() function to the CMake utilities 2019-12-03 21:42:27 -08:00
FBPythonTestAddTests.cmake getdeps: add an add_fb_python_unittest() function 2019-09-30 10:46:18 -07:00
FBThriftCppLibrary.cmake Make thrift metadata available across fbcode oss builds. 2020-02-14 14:53:47 -08:00
FBThriftLibrary.cmake fbcode_builder: add a FBThriftLibrary.cmake file 2019-08-29 22:05:44 -07:00
FBThriftPyLibrary.cmake fix the thrift CMake rules to add dependencies on the thrift compiler 2019-09-16 21:10:01 -07:00
FindGflags.cmake update FindGflags.cmake to work on CentOS 8.x (#1409) 2020-09-09 12:44:54 -07:00
FindGlog.cmake add fbcode_builder sources 2019-04-26 11:31:58 -07:00
FindGMock.cmake add fbcode_builder sources 2019-04-26 11:31:58 -07:00
FindLibEvent.cmake add fbcode_builder sources 2019-04-26 11:31:58 -07:00
FindLibUnwind.cmake only use symbolizer if libunwind is found 2020-08-17 17:08:55 -07:00
FindPCRE.cmake add fbcode_builder sources 2019-04-26 11:31:58 -07:00
FindRe2.cmake add re2 as cmake dependency 2020-09-02 22:54:23 -07:00
make_fbpy_archive.py update make_fbpy_archive.py to replace the output on Windows 2019-09-18 20:05:01 -07:00