Skip to content

Commit

Permalink
Set proper name in CPack config, enable hash generation
Browse files Browse the repository at this point in the history
  • Loading branch information
dudoslav committed Jan 19, 2024
1 parent 58bf234 commit 490614f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
7 changes: 7 additions & 0 deletions cmake/TileDB-Superbuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,10 @@ if (TILEDB_TESTS)
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tiledb
)
endif()

# make package (.tar.gz for Linux and MacOS, .zip for Windows)
add_custom_target(package
DEPENDS tiledb
COMMAND ${CMAKE_CPACK_COMMAND} --config CPackConfig.cmake -G "$<IF:$<PLATFORM_ID:Windows>,ZIP,TGZ>"
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tiledb
)
13 changes: 12 additions & 1 deletion cmake/inputs/CustomCPackOptions.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,15 @@ set(CPACK_SOURCE_IGNORE_FILES ".*\\.git")

set(CPACK_PACKAGE_VENDOR "TileDB-Inc")
set(CPACK_PACKAGE_VERSION "@TILEDB_VERSION@")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}")

# Append NOAVX2 if needed
if(NOT ${COMPILER_SUPPORTS_AVX2})
set(NOAVX2 "-noavx2")
endif()

# Set output name
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}${NOAVX2}-${CPACK_PACKAGE_VERSION}")
string(TOLOWER ${CPACK_PACKAGE_FILE_NAME} CPACK_PACKAGE_FILE_NAME )

# Enable HASH
set(CPACK_PACKAGE_CHECKSUM "SHA1")

0 comments on commit 490614f

Please sign in to comment.