• Filipe Brandenburger's avatar
    Detect and enable C++ couroutine support on CMake build with GCC · 4d5b7ad4
    Filipe Brandenburger authored
    Summary:
    This change updates the CMake config to detect whether GCC's `-fcoroutines` flag is supported and enable it for the build. This is required to enable support for Folly coroutines.
    
    Followed the instructions in GCC page about C++ coroutines to get them enabled.
    https://gcc.gnu.org/wiki/cxx-coroutines
    
    NOTE: This Wiki page used to indicate that exceptions had to be disabled to enable subroutines, but this only applied to experimental support for coroutines and it's no longer the case.
    
    This was uncovered by the fbthrift build, which needs Folly coroutines to implement streaming. A new fbthrift test using a stream type uncovered this missing feature in our build on Fedora.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D30026779
    
    fbshipit-source-id: 3324c2fc52fe5db793bdaba9c81f41bfe6ef2242
    4d5b7ad4
CMakeLists.txt 36.4 KB