Skip to content
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

minor fixes in CMakeLists #2099

Merged
merged 3 commits into from Apr 17, 2019
Merged

minor fixes in CMakeLists #2099

merged 3 commits into from Apr 17, 2019

Conversation

StrikerRUS
Copy link
Collaborator

No description provided.

if( (CMAKE_CXX_COMPILER_ID MATCHES "[cC][lL][aA][nN][gG]")
OR (CMAKE_CXX_COMPILER_ID MATCHES "[gG][nN][uU]"))
if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU"))
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMake uses "GNU" and "Clang" starting from 2.6.0 (maybe earlier) version inside itself:
https://github.com/Kitware/CMake/blob/a00f1beb530c0c9fff8deab150a07b4c3839285b/Modules/CMakeDetermineCCompiler.cmake#L130-L139
https://github.com/Kitware/CMake/blob/a00f1beb530c0c9fff8deab150a07b4c3839285b/Modules/CMakeDetermineCXXCompiler.cmake#L140-L149
And this variable is well-documented starting from version 2.8.10:
https://cmake.org/cmake/help/v2.8.10/cmake.html#variable:CMAKE_LANG_COMPILER_ID
The oldest CMake version supported by LightGBM is 2.8.

The only case for using these regexes can be user-defined compilers, but I think it's not the case we are going to support.
https://stackoverflow.com/a/40653688

@StrikerRUS StrikerRUS merged commit 2961759 into master Apr 17, 2019
@StrikerRUS StrikerRUS deleted the cmake branch April 17, 2019 12:03
@lock lock bot locked as resolved and limited conversation to collaborators Mar 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants