Skip to content

Commit

Permalink
Get better naming for CPack targets of binary vs source
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Collins <[email protected]>
  • Loading branch information
benmcollins committed Dec 24, 2024
1 parent 5075745 commit ba1d96a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
13 changes: 9 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,15 @@ if (CHECK_FOUND)
EXECUTABLE ctest -j ${PROCESSOR_COUNT}
DEPENDENCIES ${UNIT_TESTS})
endif()
else()
if (ENABLE_COVERAGE)
message(SEND_ERROR "Coverage enabled, but did not find check library")
endif()
elseif(ENABLE_COVERAGE)
message(SEND_ERROR "Coverage enabled, but did not find check library")
endif()

if (NOT ENABLE_COVERAGE)
add_custom_target(check-code-coverage
COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --cyan
"Coverage needs to be enabled for this target (ENABLE_COVERAGE=YES)"
VERBATIM)
endif()

set(CPACK_PROPERTIES_FILE "${CMAKE_SOURCE_DIR}/cmake/CPackConfig.cmake")
Expand Down
9 changes: 8 additions & 1 deletion cmake/CPackConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,16 @@ set(CPACK_GENERATOR "TBZ2")
set(CPACK_PACKAGE_VENDOR "maClara, LLC")
set(CPACK_SOURCE_GENERATOR "TBZ2")
set(CPACK_SOURCE_TBZ2 "ON")
set(CPACK_SET_DESTDIR "ON")

set(CPACK_PACKAGE_CONTACT "Ben Collins <[email protected]>")
set(CPACK_IGNORE_FILES "/\\.git/" "\\.gitignore" "\\.swp\$" "\\.DS_Store" "\\.travis.yml")
list(APPEND CPACK_IGNORE_FILES "/build/" "Makefile.*" "configure.ac" "/m4/" "Doxygen\\.mk")
list(APPEND CPACK_IGNORE_FILES "/dist/" "jwt_export\\.h\\.in" "/m4-local/")

string(TOLOWER ${CPACK_PACKAGE_NAME} CPACK_PACKAGE_NAME)
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
if (NOT ${CPACK_SOURCE_PACKAGE_FILE_NAME} EQUAL "")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
else()
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-binary")
endif()

0 comments on commit ba1d96a

Please sign in to comment.