CMAKE: moved GNA var setting to proper place; removed find_package when build python...
[platform/upstream/dldt.git] / inference-engine / cmake / cpplint_html.cmake
1 # Copyright (C) 2018-2019 Intel Corporation
2 # SPDX-License-Identifier: Apache-2.0
3 #
4
5 if(EXISTS "${REPORT_DIR}")
6     file(REMOVE_RECURSE "${REPORT_DIR}")
7 endif()
8
9 file(MAKE_DIRECTORY "${REPORT_DIR}")
10
11 execute_process(
12     COMMAND
13         "${PYTHON_EXECUTABLE}"
14         "${CONVERT_SCRIPT}"
15         "--file=${INPUT_FILE}"
16         "--report-dir=${REPORT_DIR}"
17         "--source-dir=${SOURCE_DIR}"
18         "--title=${TITLE}")
19
20 # Change cppcheck things to cpplint
21
22 file(READ "${REPORT_DIR}/index.html" cur_file_content)
23
24 string(REPLACE "Cppcheck" "cpplint" cur_file_content "${cur_file_content}")
25 string(REPLACE "a tool for static C/C++ code analysis" "an open source lint-like tool from Google" cur_file_content "${cur_file_content}")
26 string(REPLACE "http://cppcheck.sourceforge.net" "http://google-styleguide.googlecode.com/svn/trunk/cpplint/cpplint.py" cur_file_content "${cur_file_content}")
27 string(REPLACE "IRC: <a href=\"irc://irc.freenode.net/cppcheck\">irc://irc.freenode.net/cppcheck</a>" " " cur_file_content "${cur_file_content}")
28
29 file(WRITE "${REPORT_DIR}/index.html" "${cur_file_content}")