-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMake: bump min CMake version to 3.18 or remove usage of check_linker_flag()
#3500
Comments
We could update the minimum version of When a feature requires a version which is higher than the minimum, it should be guarded by version checks, and offer a fallback strategy. |
To anyone who is stuck with CI pipelines - you can upgrade your cmake from kitware apt - https://apt.kitware.com/ |
fix facebook#3500 CMake 3.18 or later was required by facebook#3392. Because it uses `CheckLinkerFlag`. But requiring CMake 3.18 or later is a bit aggressive. Because Ubuntu 20.04 LTS still uses CMake 3.16.3: https://packages.ubuntu.com/search?keywords=cmake This change disables `-z noexecstack` check with old CMake. This will not break any existing users. Because users who need `-z nonexecstack` must already use CMake 3.18 or later.
fix facebook#3500 CMake 3.18 or later was required by facebook#3392. Because it uses `CheckLinkerFlag`. But requiring CMake 3.18 or later is a bit aggressive. Because Ubuntu 20.04 LTS still uses CMake 3.16.3: https://packages.ubuntu.com/search?keywords=cmake This change disables `-z noexecstack` check with old CMake. This will not break any existing users. Because users who need `-z noexecstack` must already use CMake 3.18 or later.
How about just disabling the |
It should be safe to default to not adding the linker flag if the cmake version is too old. This PR was mostly aiming at fixing our tests, and it should be safe to skip this flag when cmake doesn't support |
fix facebook#3500 CMake 3.18 or later was required by facebook#3392. Because it uses `CheckLinkerFlag`. But requiring CMake 3.18 or later is a bit aggressive. Because Ubuntu 20.04 LTS still uses CMake 3.16.3: https://packages.ubuntu.com/search?keywords=cmake This change disables `-z noexecstack` check with old CMake. This will not break any existing users. Because users who need `-z noexecstack` must already use CMake 3.18 or later.
fix #3500 CMake 3.18 or later was required by #3392. Because it uses `CheckLinkerFlag`. But requiring CMake 3.18 or later is a bit aggressive. Because Ubuntu 20.04 LTS still uses CMake 3.16.3: https://packages.ubuntu.com/search?keywords=cmake This change disables `-z noexecstack` check with old CMake. This will not break any existing users. Because users who need `-z noexecstack` must already use CMake 3.18 or later.
#3392 (part of zstd 1.5.4) checks linker flags in CMake build by relying on https://cmake.org/cmake/help/latest/module/CheckLinkerFlag.html, a function available since CMake 3.18. But
cmake_minimum_required()
of main CMakeLists is still 2.8.12.Is it intentional to use such recent feature? If it is,
cmake_minimum_required()
should be updated accordingly. Otherwise it's possible to achieve the same checks by usingcheck_source_compiles()
and therefore avoid constraining CMakeLists of zstd to such recent CMake version.The text was updated successfully, but these errors were encountered: