mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-24 23:47:20 +00:00
implement coverity integration (see #84)
This commit is contained in:
parent
bfa4f9e98e
commit
60cbc40e9f
@ -35,9 +35,6 @@ option(BUILD_RPM_PACKAGE "Build rpm package" OFF)
|
|||||||
# build details
|
# build details
|
||||||
option(BUILD_FUTURE "Build with the features which will be marked as stable later" OFF)
|
option(BUILD_FUTURE "Build with the features which will be marked as stable later" OFF)
|
||||||
option(BUILD_TESTING "Build with additional test abilities" OFF)
|
option(BUILD_TESTING "Build with additional test abilities" OFF)
|
||||||
# some additional targets
|
|
||||||
set(CLANGFORMAT_EXECUTABLE "/usr/bin/clang-format" CACHE STRING "Path to clang-format executable")
|
|
||||||
set(CPPCHECK_EXECUTABLE "/usr/bin/cppcheck" CACHE STRING "Path to cppcheck executable")
|
|
||||||
|
|
||||||
# generate changelog
|
# generate changelog
|
||||||
set(PROJECT_CHANGELOG "Changelog" CACHE INTERNAL "")
|
set(PROJECT_CHANGELOG "Changelog" CACHE INTERNAL "")
|
||||||
@ -72,6 +69,7 @@ set(PROJECT_LIBRARY awesomewidgets)
|
|||||||
include(libraries.cmake)
|
include(libraries.cmake)
|
||||||
include(clang-format.cmake)
|
include(clang-format.cmake)
|
||||||
include(cppcheck.cmake)
|
include(cppcheck.cmake)
|
||||||
|
include(coverity.cmake)
|
||||||
|
|
||||||
get_directory_property(CMAKE_DEFINITIONS COMPILE_DEFINITIONS)
|
get_directory_property(CMAKE_DEFINITIONS COMPILE_DEFINITIONS)
|
||||||
configure_file(${CMAKE_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h)
|
configure_file(${CMAKE_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h)
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# additional target to perform clang-format run, requires clang-format
|
# additional target to perform clang-format run, requires clang-format
|
||||||
|
set(CLANGFORMAT_EXECUTABLE "/usr/bin/clang-format" CACHE STRING "Path to clang-format executable")
|
||||||
|
|
||||||
# get all project files
|
# get all project files
|
||||||
file(GLOB_RECURSE ALL_SOURCE_FILES *.cpp *.h *.h.in)
|
file(GLOB_RECURSE ALL_SOURCE_FILES *.cpp *.h *.h.in)
|
||||||
|
29
sources/coverity.cmake
Normal file
29
sources/coverity.cmake
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
# additional target to perform cppcheck run, requires cppcheck
|
||||||
|
set(COVERITY_COMMENT "" CACHE STRING "Coverity build comment")
|
||||||
|
set(COVERITY_DIRECTORY "cov-int" CACHE STRING "Path to coverity integration directory")
|
||||||
|
set(COVERITY_EMAIL "" CACHE STRING "Coverity user email")
|
||||||
|
set(COVERITY_EXECUTABLE "cov-build" CACHE STRING "Path to coverity build tool")
|
||||||
|
set(COVERITY_TOKEN "" CACHE STRING "Coverity token")
|
||||||
|
set(COVERITY_URL "https://scan.coverity.com/builds?project=Awesome+Widgets" CACHE STRING "Coverity project url")
|
||||||
|
set(CURL_EXECUTABLE "/usr/bin/curl" CACHE STRING "Path to curl executable")
|
||||||
|
|
||||||
|
add_custom_target(
|
||||||
|
coverity
|
||||||
|
COMMAND ${COVERITY_EXECUTABLE}
|
||||||
|
--dir ${COVERITY_DIRECTORY}
|
||||||
|
make
|
||||||
|
COMMAND zip
|
||||||
|
-r ${PROJECT_NAME}.zip
|
||||||
|
${COVERITY_DIRECTORY}
|
||||||
|
)
|
||||||
|
|
||||||
|
add_custom_target(
|
||||||
|
coverity-upload
|
||||||
|
COMMAND ${CURL_EXECUTABLE}
|
||||||
|
--form token=${COVERITY_TOKEN}
|
||||||
|
--form email=${COVERITY_EMAIL}
|
||||||
|
--form file=@${PROJECT_NAME}.zip
|
||||||
|
--form version=${PROJECT_VERSION}-${PROJECT_COMMIT_SHA}
|
||||||
|
--form description=${COVERITY_COMMENT}
|
||||||
|
${COVERITY_URL}
|
||||||
|
)
|
@ -1,4 +1,5 @@
|
|||||||
# additional target to perform cppcheck run, requires cppcheck
|
# additional target to perform cppcheck run, requires cppcheck
|
||||||
|
set(CPPCHECK_EXECUTABLE "/usr/bin/cppcheck" CACHE STRING "Path to cppcheck executable")
|
||||||
|
|
||||||
# get all project files
|
# get all project files
|
||||||
# HACK this workaround is required to avoid qml files checking ^_^
|
# HACK this workaround is required to avoid qml files checking ^_^
|
||||||
|
Loading…
Reference in New Issue
Block a user