Skip to content

Commit

Permalink
detect appleclang in cmake, add defines for DUCKDB_MAJOR/MINOR/PATCH_…
Browse files Browse the repository at this point in the history
…VERISON
  • Loading branch information
Maxxen committed Oct 24, 2023
1 parent 6fbc294 commit 64e187c
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(-DDUCKDB_VERSION_MAJOR=${DUCKDB_VERSION_MAJOR})
add_definitions(-DDUCKDB_VERSION_MINOR=${DUCKDB_VERSION_MINOR})
add_definitions(-DDUCKDB_VERSION_PATCH=${DUCKDB_VERSION_PATCH})

add_library_unity(duckdb_func_table_version OBJECT pragma_version.cpp)

Expand Down

0 comments on commit 64e187c

Please sign in to comment.