Skip to content

add support for appleclang and update cmake#582

Open
gold-development wants to merge 1 commit intoapache:trunkfrom
gold-development:trunk
Open

add support for appleclang and update cmake#582
gold-development wants to merge 1 commit intoapache:trunkfrom
gold-development:trunk

Conversation

@gold-development
Copy link

Added support for AppleClang and update cmake version

@silviucpp
Copy link

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

@absurdfarce
Copy link
Contributor

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

Copy link
Contributor

@absurdfarce absurdfarce left a comment

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.

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.10)
cmake_minimum_required(VERSION 3.5)
Copy link
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?


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

@absurdfarce absurdfarce Mar 25, 2026

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.

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