Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[INFRA] Make packaging easier #3318

Merged
merged 5 commits into from
Dec 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions cmake/package-lock.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
# Ideally, both are the same, which might not always be possible: https://github.com/cpm-cmake/CPM.cmake/issues/603
# This is needed to support CPM_USE_LOCAL_PACKAGES

# cmake-format: off

# cereal
set (SEQAN3_CEREAL_VERSION 1.3.2)
set (SEQAN3_CEREAL_VERSION 1.3.2 CACHE STRING "" FORCE)
CPMDeclarePackage (cereal
NAME cereal
VERSION ${SEQAN3_CEREAL_VERSION}
Expand All @@ -25,14 +27,14 @@ CPMDeclarePackage (cereal
# Use URL download of the commit archive such that we do not clone submodules
# Package name is still sdsl (name as v2 at xxsds/sdsl), but sdsl-lite is not currently being packaged
# To avoid accidentally using the older sdsl, NAME is set to sdsl-lite
set (SEQAN3_SDSL_VERSION 14cd017027ea742353fc5b500d1cb1d95896b77e)
set (SEQAN3_SDSL_VERSION 14cd017027ea742353fc5b500d1cb1d95896b77e CACHE STRING "" FORCE)
CPMDeclarePackage (sdsl-lite
NAME sdsl-lite
URL https://github.com/xxsds/sdsl-lite/archive/${SEQAN3_SDSL_VERSION}.tar.gz # master
DOWNLOAD_ONLY YES
QUIET YES)
# benchmark
set (SEQAN3_BENCHMARK_VERSION 1.9.1)
set (SEQAN3_BENCHMARK_VERSION 1.9.1 CACHE STRING "" FORCE)
CPMDeclarePackage (benchmark
NAME benchmark
VERSION ${SEQAN3_BENCHMARK_VERSION}
Expand All @@ -41,35 +43,37 @@ CPMDeclarePackage (benchmark
OPTIONS "BENCHMARK_ENABLE_TESTING OFF" "BENCHMARK_ENABLE_WERROR OFF"
"CMAKE_MESSAGE_LOG_LEVEL WARNING")
# googletest
set (SEQAN3_GOOGLETEST_VERSION 1.15.2)
set (SEQAN3_GOOGLETEST_VERSION 1.15.2 CACHE STRING "" FORCE)
CPMDeclarePackage (googletest
NAME GTest
VERSION ${SEQAN3_GOOGLETEST_VERSION}
GITHUB_REPOSITORY google/googletest
SYSTEM TRUE
OPTIONS "BUILD_GMOCK OFF" "INSTALL_GTEST OFF" "CMAKE_MESSAGE_LOG_LEVEL WARNING")
# doxygen-awesome
set (SEQAN3_DOXYGEN_AWESOME_VERSION 2.3.4)
set (SEQAN3_DOXYGEN_AWESOME_VERSION 2.3.4 CACHE STRING "" FORCE)
CPMDeclarePackage (doxygen_awesome
NAME doxygen_awesome
VERSION ${SEQAN3_DOXYGEN_AWESOME_VERSION}
GITHUB_REPOSITORY jothepro/doxygen-awesome-css
DOWNLOAD_ONLY TRUE
QUIET YES)
# seqan2
set (SEQAN3_SEQAN2_VERSION 578218d744522c43bc9e769f14be9c26d7e5de85)
set (SEQAN3_SEQAN2_VERSION 578218d744522c43bc9e769f14be9c26d7e5de85 CACHE STRING "" FORCE)
CPMDeclarePackage (seqan
NAME seqan
GIT_TAG ${SEQAN3_SEQAN2_VERSION} # main
GITHUB_REPOSITORY seqan/seqan
DOWNLOAD_ONLY YES
QUIET YES)
# use_ccache
set (SEQAN3_USE_CCACHE_VERSION d2a54ef555b6fc2d496a4c9506dbeb7cf899ce37)
set (SEQAN3_USE_CCACHE_VERSION d2a54ef555b6fc2d496a4c9506dbeb7cf899ce37 CACHE STRING "" FORCE)
CPMDeclarePackage (use_ccache
NAME use_ccache
GIT_TAG ${SEQAN3_USE_CCACHE_VERSION} # main
GITHUB_REPOSITORY seqan/cmake-scripts
SOURCE_SUBDIR ccache
SYSTEM TRUE
EXCLUDE_FROM_ALL TRUE)

# cmake-format: on
1 change: 1 addition & 0 deletions test/documentation/seqan3-doxygen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ else ()
# subsequently deployed to a server.
add_custom_target (download-cppreference-doxygen-web-tag)
add_custom_command (TARGET download-cppreference-doxygen-web-tag
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy "${SEQAN3_DOXYGEN_STD_TAGFILE}"
"${SEQAN3_DEFAULT_DOXYGEN_STD_TAGFILE}"
BYPRODUCTS "${SEQAN3_DEFAULT_DOXYGEN_STD_TAGFILE}")
Expand Down
3 changes: 2 additions & 1 deletion test/documentation/seqan3_doxygen_cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ RECURSIVE = YES
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS = */doc/*.cpp \
*/contrib/std/* \
*/include/seqan3/contrib/std/* \
*/include/seqan3/vendor/* \
${SEQAN3_DOXYGEN_EXCLUDE_PATTERNS}
EXCLUDE_SYMBOLS = seqan3::contrib \
${SEQAN3_DOXYGEN_EXCLUDE_SYMBOLS}
Expand Down
2 changes: 1 addition & 1 deletion test/header/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ endmacro ()

# note: seqan3/contrib/std/* will not be tested, because they use local (#include "file") includes
# note: seqan3/version.hpp is one of the only header that is not required to have a seqan3/core/platform.hpp include
seqan3_header_test (seqan3 "${SEQAN3_CLONE_DIR}/include" "seqan3/version.hpp|seqan3/contrib/std")
seqan3_header_test (seqan3 "${SEQAN3_CLONE_DIR}/include" "seqan3/version.hpp|seqan3/contrib/std|seqan3/vendor")
seqan3_header_test (seqan3_test "${SEQAN3_CLONE_DIR}/test/include" "")

if (SEQAN3_FULL_HEADER_TEST)
Expand Down
7 changes: 6 additions & 1 deletion test/seqan3-test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,13 @@ find_package (SeqAn3 REQUIRED HINTS ${CMAKE_CURRENT_LIST_DIR}/../cmake)

enable_testing ()

set (SEQAN3_TEST_CPM_DIR
"${CMAKE_CURRENT_LIST_DIR}/../cmake/"
CACHE STRING "Path to directory containing CPM.cmake.")

set (CPM_INDENT "CMake Package Manager CPM: ")
CPMUsePackageLock ("${CMAKE_CURRENT_LIST_DIR}/../cmake/package-lock.cmake")
include ("${SEQAN3_TEST_CPM_DIR}/CPM.cmake")
CPMUsePackageLock ("${SEQAN3_TEST_CPM_DIR}/package-lock.cmake")

include (CheckCXXCompilerFlag)
include (CheckCXXSourceCompiles)
Expand Down
Loading