• Matthew Glazar's avatar
    Don't clobber CXXFLAGS/CMAKE_CXX_FLAGS (#1046) · 15fff7c1
    Matthew Glazar authored
    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
    15fff7c1
FollyCompilerUnix.cmake 1.6 KB