Skip to content

cmakelists: Fix CMAKE_COMPILER_ID => CMAKE_<lang>_COMPILER_ID#6438

Closed
SirLynix wants to merge 1 commit intoxmake-io:devfrom
SirLynix:patch-19
Closed

cmakelists: Fix CMAKE_COMPILER_ID => CMAKE_<lang>_COMPILER_ID#6438
SirLynix wants to merge 1 commit intoxmake-io:devfrom
SirLynix:patch-19

Conversation

@SirLynix
Copy link
Member

@waruqi
Copy link
Member

waruqi commented May 14, 2025

Which one is more correct? #6439

@SirLynix
Copy link
Member Author

I think it would be mine because I use CMAKE_C_COMPILER_ID when it's not sure and CMAKE_CXX_LINKER_ID, what do you think @PierreEVEN?

@PierreEVEN
Copy link
Contributor

PierreEVEN commented May 14, 2025

I think it would be mine because I use CMAKE_C_COMPILER_ID when it's not sure and CMAKE_CXX_LINKER_ID, what do you think @PierreEVEN?

I was wondering if "C" is better than "CXX". I saw "CXX" everywhere else so I choose to keep it consistent but you may be right.

By the way the value for CMAKE_CXX_COMPILER_LINKER_ID with Clang is "AppleClang" according to the documentation and not "Clang" as expected.
https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER_LINKER_ID.html#variable:CMAKE_%3CLANG%3E_COMPILER_LINKER_ID

@PierreEVEN
Copy link
Contributor

Which one is more correct?

#6439 (mine) works as long as CXX is enabled. but it has the same problem as this pr if C is not enabled. I'm fixing it to handle both cases...

@SirLynix
Copy link
Member Author

Closing because #6439 will have a better fix

@SirLynix SirLynix closed this May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants