Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmake: compile with -std=gnu++1z by default
Summary: Update thrift's CMakeLists.txt file to compile with `-std=gnu++1z` This is required in order to allow downstream projects that use fbthrift to build with `-std=gnu++1z`. The linkage for how constexpr variables are emitted has changed between `gnu++14` and `gnu++1z`. If fbthrift is compiled with `gnu++14` but downstream dependencies try to build with `gnu++1z` they will get link errors (multiple definitions) for constexpr variables defined in fbthrift header files. I manually updated the code to pass `-std=gnu++1z` on the compile line rather than using `CMAKE_CXX_STANDARD` so that we can still support older versions of CMake. Support for C++17 through `CMAKE_CXX_STANDARD` was not added until CMake 3.8. Reviewed By: yfeldblum Differential Revision: D10498113 fbshipit-source-id: 407c605174ef80ebdb87dbe05c30a8831ed0b278
- Loading branch information