Detect AppleClang in cmake, add defines for DUCKDB_MAJOR/MINOR/PATCH_VERSION
#9457
+4
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Trying to build spatial on latest main made me hit a CMake error branch, but upon investigating it seems like it should be supported for Apple+clang, its just that we don't detect the "AppleClang" compiler ID. Not sure what the intended behavior is here but it seems to work with the change in this PR.
This PR also adds defines for
DUCKDB_MAJOR/MINOR/PATCH_VERSION
which is useful for e.g. extensions (spatial) that tries to build for both the latest stable and keep up to date with development versions of DuckDB. Even though we already have aDUCKDB_VERSION
define, it is defined as a c-string which we can't easily compare in the preprocessor.CC @samansmink