• Adam Simpkins's avatar
    cmake: support building with shared libraries enabled · cdb9225b
    Adam Simpkins authored
    Summary:
    In general, building folly as a shared library is not recommended since the
    library ABI changes frequently.
    
    Nonetheless, this updates the CMake files to support building with
    `BUILD_SHARED_LIBS=ON`.  Previously the build would fail when using this
    option.
    
    The main reason to support this for now is because some of the tests can only
    be run when compiled with `-fPIC`.  Defining `FOLLY_SHARED_LIBRARY_SUPPORT` in
    `folly-config.h` makes it possible to skip these tests when being compiled
    without shared library support.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D6805682
    
    fbshipit-source-id: 098290c7405837350577f48ed224947fb62415db
    cdb9225b
CMakeLists.txt 27.9 KB