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

[cmake] fix condition for apple clang #2051

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ilya-lavrenov
Copy link
Contributor

Description

Cmake identifies Apple clang as "AppleClang"

Fixes # (github issue)

Checklist

General

  • Do all unit and benchdnn tests (make test and make test_benchdnn_*) pass locally for each commit?
  • Have you formatted the code using clang-format?

Performance improvements

  • Have you submitted performance data that demonstrates performance improvements?

New features

  • Have you published an RFC for the new feature?
  • Was the RFC approved?
  • Have you added relevant tests?

Bug fixes

  • Have you included information on how to reproduce the issue (either in a github issue or in this PR)?
  • Have you added relevant regression tests?

RFC PR

  • Does RFC document follow the template?
  • Have you added a link to the rendered document?

@ilya-lavrenov ilya-lavrenov requested a review from a team as a code owner August 22, 2024 07:46
@vpirogov
Copy link
Member

@ilya-lavrenov, CI results indicate that this is not the case for configuration we are testing. Which CMake version did you try?

@ilya-lavrenov
Copy link
Contributor Author

We use 3.13 as minimum required.
Do you really need to support cmake 2.8.x ?

@densamoilov
Copy link
Contributor

Do you really need to support cmake 2.8.x ?

Good question, we may have to bump the minimum required CMake version to at least 3.5 as the older versions have been deprecated in CMake 3.27.

@vpirogov
Copy link
Member

Good question, we may have to bump the minimum required CMake version to at least 3.5 as the older versions have been deprecated in CMake 3.27.

We are using CMake 2.8.12 as minimal supported version to ensure RHEL 7 compatibility. As RHEL 7 is now out of production support we could bump it. RHEL8 has 3.11.4 and Ubuntu 20.04 has 3.16.3.

@@ -23,7 +23,7 @@ endif()
set(OpenMP_cmake_included true)
include("cmake/Threading.cmake")

if (APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
Copy link
Contributor

Choose a reason for hiding this comment

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

Currently this check applied to all Clangs on macOS, after the change only to Apple provided Clang. If we want to retain the old logic, then MATCHES would be a better option like: if (APPLE AND CMAKE_CXX_COMPILER_ID MATCHES "Clang"). It should catch both Clangs.

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.

4 participants