Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 16, 2024
1 parent a464a75 commit 5668d4e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 36 deletions.
30 changes: 13 additions & 17 deletions dist.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ macro(_SETUP_PROJECT_DIST)

# Use git-archive-all.sh to generate distributable source code
if(NOT TARGET distdir)
add_custom_target(distdir
COMMENT "Generating dist directory...")
add_custom_target(distdir COMMENT "Generating dist directory...")
endif()
add_custom_target(
${PROJECT_NAME}-distdir
Expand Down Expand Up @@ -66,8 +65,8 @@ macro(_SETUP_PROJECT_DIST)

# Create a tar.gz tarball for the project, and generate the signature
if(NOT TARGET dist_targz)
add_custom_target(dist_targz
COMMENT "Generating tar.gz tarball and its signature...")
add_custom_target(
dist_targz COMMENT "Generating tar.gz tarball and its signature...")
endif()
add_custom_target(
${PROJECT_NAME}-dist_targz
Expand All @@ -80,14 +79,14 @@ macro(_SETUP_PROJECT_DIST)
${PROJECT_BINARY_DIR}/${PROJECT_NAME}${PROJECT_SUFFIX}-${PROJECT_VERSION}.tar.gz
# cmake-format: on
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
COMMENT "Generating tar.gz tarball and its signature for ${PROJECT_NAME}...")
COMMENT
"Generating tar.gz tarball and its signature for ${PROJECT_NAME}...")
add_dependencies(dist_targz ${PROJECT_NAME}-dist_targz)

# Create a tar.bz2 tarball for the project, and generate the signature
if(NOT TARGET dist_tarbz2)
add_custom_target(
dist_tarbz2
COMMENT "Generating tar.bz2 tarball and its signature...")
dist_tarbz2 COMMENT "Generating tar.bz2 tarball and its signature...")
endif()
add_custom_target(
${PROJECT_NAME}-dist_tarbz2
Expand All @@ -100,14 +99,14 @@ macro(_SETUP_PROJECT_DIST)
${PROJECT_BINARY_DIR}/${PROJECT_NAME}${PROJECT_SUFFIX}-${PROJECT_VERSION}.tar.bz2
# cmake-format: on
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
COMMENT "Generating tar.bz2 tarball and its signature for ${PROJECT_NAME}...")
COMMENT
"Generating tar.bz2 tarball and its signature for ${PROJECT_NAME}...")
add_dependencies(dist_tarbz2 ${PROJECT_NAME}-dist_tarbz2)

# Create a tar.xz tarball for the project, and generate the signature
if(NOT TARGET dist_tarxz)
add_custom_target(
dist_tarxz
COMMENT "Generating tar.xz tarball and its signature...")
dist_tarxz COMMENT "Generating tar.xz tarball and its signature...")
endif()
add_custom_target(
${PROJECT_NAME}-dist_tarxz
Expand All @@ -120,7 +119,8 @@ macro(_SETUP_PROJECT_DIST)
${PROJECT_BINARY_DIR}/${PROJECT_NAME}${PROJECT_SUFFIX}-${PROJECT_VERSION}.tar.xz
# cmake-format: on
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
COMMENT "Generating tar.xz tarball and its signature for ${PROJECT_NAME}...")
COMMENT
"Generating tar.xz tarball and its signature for ${PROJECT_NAME}...")
add_dependencies(dist_tarxz ${PROJECT_NAME}-dist_tarxz)

# Alias: dist = dist_targz (backward compatibility)
Expand All @@ -132,9 +132,7 @@ macro(_SETUP_PROJECT_DIST)

# TODO: call this during `make clean`
if(NOT TARGET distclean)
add_custom_target(
distclean
COMMENT "Cleaning dist sources...")
add_custom_target(distclean COMMENT "Cleaning dist sources...")
endif()
add_custom_target(
${PROJECT_NAME}-distclean
Expand All @@ -148,9 +146,7 @@ macro(_SETUP_PROJECT_DIST)
add_dependencies(distclean ${PROJECT_NAME}-distclean)

if(NOT TARGET distorig)
add_custom_target(
distorig
COMMENT "Generating orig tarball...")
add_custom_target(distorig COMMENT "Generating orig tarball...")
endif()
add_custom_target(
${PROJECT_NAME}-distorig
Expand Down
3 changes: 1 addition & 2 deletions distcheck.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ macro(DISTCHECK_SETUP)
"${CMAKE_BINARY_DIR}")

if(NOT TARGET distcheck)
add_custom_target(distcheck
COMMENT "Checking generated tarball...")
add_custom_target(distcheck COMMENT "Checking generated tarball...")
endif()
add_custom_target(
${PROJECT_NAME}-distcheck
Expand Down
25 changes: 8 additions & 17 deletions release.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ macro(RELEASE_SETUP)
endif(APPLE)

if(NOT TARGET release_package_xml)
add_custom_target(
release_package_xml
COMMENT "Update package.xml")
add_custom_target(release_package_xml COMMENT "Update package.xml")
endif()
add_custom_target(
${PROJECT_NAME}-release_package_xml
Expand All @@ -75,8 +73,7 @@ macro(RELEASE_SETUP)
add_dependencies(release_package_xml ${PROJECT_NAME}-release_package_xml)

if(NOT TARGET release_pyproject_toml)
add_custom_target(release_pyproject_toml
COMMENT "Update pyproject.toml")
add_custom_target(release_pyproject_toml COMMENT "Update pyproject.toml")
endif()
add_custom_target(
${PROJECT_NAME}-release_pyproject_toml
Expand All @@ -96,11 +93,11 @@ macro(RELEASE_SETUP)
&&
echo
"Updated pyproject.toml and committed") ; fi)
add_dependencies(release_pyproject_toml ${PROJECT_NAME}-release_pyproject_toml)
add_dependencies(release_pyproject_toml
${PROJECT_NAME}-release_pyproject_toml)

if(NOT TARGET release_changelog)
add_custom_target(release_changelog
COMMENT "Update CHANGELOG.md")
add_custom_target(release_changelog COMMENT "Update CHANGELOG.md")
endif()
add_custom_target(
${PROJECT_NAME}-release_changelog
Expand All @@ -126,9 +123,7 @@ macro(RELEASE_SETUP)
add_dependencies(release_changelog ${PROJECT_NAME}-release_changelog)

if(NOT TARGET release_pixi_toml)
add_custom_target(
release_pixi_toml
COMMENT "Update pixi.toml")
add_custom_target(release_pixi_toml COMMENT "Update pixi.toml")
endif()
add_custom_target(
${PROJECT_NAME}-release_pixi_toml
Expand All @@ -148,9 +143,7 @@ macro(RELEASE_SETUP)
add_dependencies(release_pixi_toml ${PROJECT_NAME}-release_pixi_toml)

if(NOT TARGET release_citation_cff)
add_custom_target(
release_citation_cff
COMMENT "Update CITATION.cff")
add_custom_target(release_citation_cff COMMENT "Update CITATION.cff")
endif()
add_custom_target(
${PROJECT_NAME}-release_citation_cff
Expand All @@ -166,9 +159,7 @@ macro(RELEASE_SETUP)

set(BUILD_CMD ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR} --target)
if(NOT TARGET release)
add_custom_target(
release
COMMENT "Create a new release")
add_custom_target(release COMMENT "Create a new release")
endif()
add_custom_target(
${PROJECT_NAME}-release
Expand Down

0 comments on commit 5668d4e

Please sign in to comment.