Files
openvino/inference-engine/cmake/cpplint_html.cmake

30 lines
1.1 KiB
CMake
Raw Normal View History

2020-02-11 22:48:49 +03:00
# Copyright (C) 2018-2020 Intel Corporation
2019-04-12 18:25:53 +03:00
# SPDX-License-Identifier: Apache-2.0
#
if(EXISTS "${REPORT_DIR}")
file(REMOVE_RECURSE "${REPORT_DIR}")
endif()
file(MAKE_DIRECTORY "${REPORT_DIR}")
execute_process(
COMMAND
"${PYTHON_EXECUTABLE}"
"${CONVERT_SCRIPT}"
"--file=${INPUT_FILE}"
"--report-dir=${REPORT_DIR}"
"--source-dir=${SOURCE_DIR}"
"--title=${TITLE}")
# Change cppcheck things to cpplint
file(READ "${REPORT_DIR}/index.html" cur_file_content)
2019-08-09 19:02:42 +03:00
string(REPLACE "Cppcheck" "cpplint" cur_file_content "${cur_file_content}")
string(REPLACE "a tool for static C/C++ code analysis" "an open source lint-like tool from Google" cur_file_content "${cur_file_content}")
string(REPLACE "http://cppcheck.sourceforge.net" "http://google-styleguide.googlecode.com/svn/trunk/cpplint/cpplint.py" cur_file_content "${cur_file_content}")
string(REPLACE "IRC: <a href=\"irc://irc.freenode.net/cppcheck\">irc://irc.freenode.net/cppcheck</a>" " " cur_file_content "${cur_file_content}")
2019-04-12 18:25:53 +03:00
file(WRITE "${REPORT_DIR}/index.html" "${cur_file_content}")