Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

add support for appleclang and update cmake#582

Open
gold-development wants to merge 1 commit into
apache:trunk from
gold-development:trunk
Open

add support for appleclang and update cmake #582
gold-development wants to merge 1 commit into
apache:trunk from
gold-development:trunk

Conversation

@gold-development

@gold-development gold-development commented Jan 14, 2026

Copy link
Copy Markdown

Added support for AppleClang and update cmake version

Copy link
Copy Markdown

Mac os build seems broken . any plan to commit this ?

Copy link
Copy Markdown
Contributor

Apologies, I've been distracted by too many things. @yifan-c can you take a look at this one as well?

@absurdfarce absurdfarce left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A few questions but I'll defer to @yifan-c on the details since I know he's been working much more directly in this space.

Comment thread CMakeLists.txt
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.10)
cmake_minimum_required(VERSION 3.5)

@absurdfarce absurdfarce Mar 25, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you elaborate on a couple things here?

First: why is it necessary to change the cmake minimum version at all in order to fix this?

Second: if it is necessary to change it why are we tweaking it only in three CMakeLists files rather than uniformly throughout the project?

@toptobes toptobes Jun 11, 2026
edited
Loading

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looking at the git logs, I'm fairly certain what happened is that they were originally basing this off the version of the c++ driver 2 weeks before this PR was created, when it was still using cmake version 2.8.12 (so this was intended as an upgrade, not a downgrade)

See:

 git lg 
* a22a11a3 golddevelopment - (HEAD -> gold-development/trunk) add support for appleclang and update cmake (5 months ago)
* e5a486ac Sigmanificient - Bump minimum required version for cmake4 compatibility (5 months ago)
 git lg -L 1,1:CMakeLists.txt 
* a22a11a3 golddevelopment - (HEAD -> gold-development/trunk) add support for appleclang and update cmake (5 months ago)| 
| diff --git a/CMakeLists.txt b/CMakeLists.txt
| --- a/CMakeLists.txt
| +++ b/CMakeLists.txt
| @@ -1,1 +1,1 @@
| -cmake_minimum_required(VERSION 3.10)
| +cmake_minimum_required(VERSION 3.5)
* e5a486ac Sigmanificient - Bump minimum required version for cmake4 compatibility (5 months ago)| 
| diff --git a/CMakeLists.txt b/CMakeLists.txt
| --- a/CMakeLists.txt
| +++ b/CMakeLists.txt
| @@ -1,1 +1,1 @@
| -cmake_minimum_required(VERSION 2.8.12)
| +cmake_minimum_required(VERSION 3.10)

P.S. AppleClang only got differentiated from Clang in 3.0 which is why this wasn't an issue previously

@absurdfarce absurdfarce Jun 11, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This seems reasonable @toptobes but even if it is the case I'd still argue for a uniform cmake requirement throughout the project. Note the commit referenced above; in that case we updated cmake_minimum_required() throughout the project. If we're going to change the cmake requirement at all here it seems like we should do the same.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Comment thread CMakeLists.txt

if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR
"${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")

@absurdfarce absurdfarce Mar 25, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'll let him speak on this for sure but I believe @yifan-c was able to get this working more generally using regex matching:

if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang$" 

That's probably more desirable as it covers a broader range of clang derivatives. cmake supports a number of such variants so as long as the flags in question apply to clang generally (i.e. isn't some custom flag implemented for a specific clang variant) the more general syntax seems preferrable.

Copy link
Copy Markdown
Contributor

@gold-development Are you able to speak to any of the comments on this PR? I'd love to get this change into 2.17.2 but I do think we have a few points to talk about in the changes above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@absurdfarce absurdfarce absurdfarce left review comments
@yifan-c yifan-c Awaiting requested review from yifan-c
+1 more reviewer
@toptobes toptobes toptobes left review comments
Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /