-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Replace deprecated CMAKE_COMPILER_IS_GNU(CC|CXX) with CMAKE_(C|CXX)_COMPILER_ID #4056
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
base: 10.6
Are you sure you want to change the base?
Conversation
2ca81ac
to
3c6209d
Compare
cc @grooverdan |
…OMPILER_ID As of CMake 3.24 CMAKE_COMPILER_IS_GNU(CC|CXX) are deprecated and should be replaced with CMAKE_(C|CXX)_COMPILER_ID which were introduced with CMake 2.6.
3c6209d
to
7a4af63
Compare
@brad0 thanks for updating your patch. There is no need to create new PR. You can force update original branch and change target version. It is better to keep discussion in one place. |
You are aware that CMAKE_COMPILER_IS_GNU(CC|CXX) and CMAKE_(C|CXX)_COMPILER_ID STREQUAL "GNU" are not the same thing? That CMAKE_COMPILER_IS_GNU(CC|CXX) is either gcc or command-line compatible clang? |
That IS how CMake handles things.
You can see examples in CMake's own codebase where they're checking for GCC using CMAKE_COMPILER_IS_GNUCC
That is NOT the case. CMAKE_COMPILER_IS_GNU(CC|CXX) is only set for GCC. I started this patch as step 1 to fix a test that should be executing with Clang but does not at the moment with it only checking CMAKE_COMPILER_IS_GNUCC. |
Indeed, sorry for confusion, heh. this seems not to be the case already since Oct 2013 (https://cmake.org/pipermail/cmake/2013-October/056071.html) and version 2.8.10 or so, but I was sure it is still the case. |
Ah, I see why you thought that. When CMake didn't understand identifying Clang it made sense why it did that, but the corrections in behavior make sense to be able to differentiate the two properly (and other variants). |
Description
Replace deprecated use of CMAKE_COMPILER_IS_GNU(CC|CXX) with CMAKE_(C|CXX)COMPILER_ID
throughout the tree. Some places already use CMAKE(C|CXX)_COMPILER_ID.
As of CMake 3.24 CMAKE_COMPILER_IS_GNU(CC|CXX) are deprecated and should be replaced with
CMAKE_(C|CXX)_COMPILER_ID which were introduced with CMake 2.6.
How can this PR be tested?
Build and check the various paths are taken as appropriate.
Basing the PR against the correct MariaDB version
main
branch.PR quality check