Skip to content

Commit

Permalink
Merge pull request duckdb#9457 from Maxxen/cmake-fix
Browse files Browse the repository at this point in the history
Detect AppleClang in cmake, add defines for `DUCKDB_MAJOR/MINOR/PATCH_VERSION`
  • Loading branch information
Mytherin authored Oct 25, 2023
2 parents b0ad0c0 + 84adaa8 commit 10f9bd9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ function(build_loadable_extension_directory NAME OUTPUT_DIRECTORY PARAMETERS)
if(WASM_LOADABLE_EXTENSIONS)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -sSIDE_MODULE=1 -DWASM_LOADABLE_EXTENSIONS")
elseif (EXTENSION_STATIC_BUILD)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
if (APPLE)
set_target_properties(${TARGET_NAME} PROPERTIES CXX_VISIBILITY_PRESET hidden)
# Note that on MacOS we need to use the -exported_symbol whitelist feature due to a lack of -exclude-libs flag in mac's ld variant
Expand Down
3 changes: 3 additions & 0 deletions src/function/table/version/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
add_definitions(-DDUCKDB_SOURCE_ID="\""${GIT_COMMIT_HASH}"\"")
add_definitions(-DDUCKDB_VERSION="\""${DUCKDB_VERSION}"\"")
add_definitions(-DUCKDB_MAJOR_VERSION=${DUCKDB_MAJOR_VERSION})
add_definitions(-DUCKDB_MINOR_VERSION=${DUCKDB_MINOR_VERSION})
add_definitions(-DUCKDB_PATCH_VERSION=${DUCKDB_PATCH_VERSION})

add_library_unity(duckdb_func_table_version OBJECT pragma_version.cpp)

Expand Down

0 comments on commit 10f9bd9

Please sign in to comment.