Initial base for codecov
This commit is contained in:
parent
e1f7575be2
commit
099b342ee1
3 changed files with 17 additions and 2 deletions
|
|
@ -8,6 +8,7 @@ set(CMAKE_VERBOSE_MAKEFILE on)
|
|||
|
||||
# Enable or disable targets
|
||||
option(KOMPUTE_OPT_BUILD_TESTS "Enable if you want to build tests" 0)
|
||||
option(KOMPUTE_OPT_CODE_COVERAGE "Enable if you want code coverage" 0)
|
||||
option(KOMPUTE_OPT_BUILD_DOCS "Enable if you want to build documentation" 0)
|
||||
option(KOMPUTE_OPT_BUILD_SHADERS "Enable if you want to re-build all shader files" 0)
|
||||
option(KOMPUTE_OPT_BUILD_SINGLE_HEADER "Enable if you want to build the single header file" 0)
|
||||
|
|
@ -41,6 +42,10 @@ endif()
|
|||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG=1 ${KOMPUTE_EXTRA_CXX_FLAGS} -DUSE_DEBUG_EXTENTIONS")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DRELEASE=1 ${KOMPUTE_EXTRA_CXX_FLAGS}")
|
||||
|
||||
if(KOMPUTE_OPT_CODE_COVERAGE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage --coverage")
|
||||
endif()
|
||||
|
||||
# Allow scripts to call main kompute Makefile
|
||||
function(kompute_make KOMPUTE_MAKE_TARGET)
|
||||
add_custom_target(${KOMPUTE_MAKE_TARGET}
|
||||
|
|
|
|||
3
Makefile
3
Makefile
|
|
@ -179,6 +179,9 @@ generate_python_docstrings:
|
|||
install_python_reqs:
|
||||
python3 -m pip install -r scripts/requirements.txt
|
||||
|
||||
install_lcov:
|
||||
sudo apt install lcov -y
|
||||
|
||||
build_shaders:
|
||||
python3 scripts/convert_shaders.py \
|
||||
--shader-path shaders/glsl \
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ set(DOXYFILE_IN
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in)
|
||||
set(DOXYFILE_OUT
|
||||
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
|
||||
set(CODECOV_INDEX_FILE
|
||||
${DOXYGEN_OUTPUT_DIR/html/codecov/index.html})
|
||||
|
||||
# Perform replacement with cmake vars inside Doxifine.in
|
||||
configure_file(${DOXYFILE_IN} ${DOXYFILE_OUT} @ONLY)
|
||||
|
|
@ -33,8 +35,13 @@ add_custom_command(
|
|||
COMMENT "Generating docs"
|
||||
)
|
||||
|
||||
add_custom_target(gendoxygen ALL
|
||||
DEPENDS ${DOXYGEN_INDEX_FILE})
|
||||
if(KP_OPT_DOCS_GEN_CODECOV)
|
||||
add_custom_target(gendoxygen ALL
|
||||
DEPENDS ${DOXYGEN_INDEX_FILE} ${DOXYGEN_OUTPUT_DIR})
|
||||
else()
|
||||
add_custom_target(gendoxygen ALL
|
||||
DEPENDS ${DOXYGEN_INDEX_FILE})
|
||||
endif()
|
||||
|
||||
|
||||
#####################################################
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue