Don't clobber CXXFLAGS/CMAKE_CXX_FLAGS (#1046)
Summary:
CMake allows the user to add additional compilation options using
CXXFLAGS= or -DCMAKE_CXX_FLAGS=. For example, each of the following
commands would enable GCC security features in generated code:
$ CXXFLAGS=-fstack-protector-strong cmake .
$ cmake -DCMAKE_CXX_FLAGS=-fstack-protector-strong .
Unfortunately, this doesn't work with folly's build system; CXXFLAGS and
CMAKE_CXX_FLAGS are ignored. This makes it harder for package managers
to tweak folly's compilation.
Teach folly to respect user-supplied compiler flags instead of
overriding them.
Pull Request resolved: https://github.com/facebook/folly/pull/1046
Reviewed By: wez
Differential Revision: D14383310
Pulled By: yfeldblum
fbshipit-source-id: a6c527fa1659b93bb88a4e0be617a5d9022489dd
Showing
Please register or sign in to comment