Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: add compiler and C++ standard compatibility checks
we install `SeastarConfig.cmake` so that a Seastar project can consume the Seastar libraries using `find_package(Seastar)`. this CMake config file checks for the dependencies used by CMake, and defines the Seastar libraries to be consumed by the parent project. one of the dependence is detected using FindSourceLocation.cmake, which is also shipped along with Seastar, this find module is provided so that we can detect the C++ compiler support of `std::source_location` related features. But the result of the detection depends on the C++ standard used, which is default to the one configured by the used C++ compiler if not specified. if the parent project consumes precompiled Seastar libraries, and use a differnt C++ standard, the parent project could fail to build, because Seastar and parent project are using different compiling options. mismatches in C++ standards or compilers between Seastar and the parent project can lead to build failures or runtime issues. while not always problematic, these mismatches can cause unexpected behavior. in this change, we detect - the C++ standards use by the parent project and Seastar - the C++ compiler used by the parent project and Seastar warnings are non-fatal as compatibility is possible in some cases, but developers should be aware of potential issues and test thoroughly. Fixes #2181 Signed-off-by: Kefu Chai <[email protected]>
- Loading branch information