Revision 1dfb8b4217ad6a4c9161e67830ba833cd3ad497c authored by Wenqing Wang on 04 April 2023, 12:51:40 UTC, committed by Dmitri Naumov on 14 April 2023, 11:05:58 UTC
to ComponentTransportProcessData to avoid memory allocation
1 parent 5e2ab7d
CppCheck.cmake
if(NOT CPPCHECK_TOOL_PATH)
return()
endif()
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CPPCHECK_PARALLEL 4)
if(DEFINED ENV{CMAKE_BUILD_PARALLEL_LEVEL})
set(CPPCHECK_PARALLEL $ENV{CMAKE_BUILD_PARALLEL_LEVEL})
elseif(DEFINED CMAKE_BUILD_PARALLEL_LEVEL)
set(CPPCHECK_PARALLEL ${CMAKE_BUILD_PARALLEL_LEVEL})
endif()
if(DEFINED CPM_SOURCE_CACHE)
set(_cpp_check_ingore "-i${CPM_SOURCE_CACHE}")
else()
set(_cpp_check_ingore "-i${PROJECT_BINARY_DIR}/_deps")
endif()
configure_file(
${PROJECT_SOURCE_DIR}/scripts/test/cppcheck.in.sh
${PROJECT_BINARY_DIR}/cppcheck.sh
)
if(DEFINED ENV{NUM_THREADS})
set(CPPCHECK_THREADS -j $ENV{NUM_THREADS})
endif()
add_custom_target(
cppcheck
COMMAND
${CPPCHECK_TOOL_PATH}
--project=${PROJECT_BINARY_DIR}/compile_commands.json --language=c++
--std=c++20 --enable=all --inconclusive ${CPPCHECK_THREADS} -i
${PROJECT_BINARY_DIR}/CMakeFiles -i ${PROJECT_BINARY_DIR}/_deps -i
${PROJECT_SOURCE_DIR}/ThirdParty -i
${PROJECT_SOURCE_DIR}/Applications/DataExplorer -i
${PROJECT_SOURCE_DIR}/Tests --xml --xml-version=2
--output-file=${PROJECT_BINARY_DIR}/cppcheck.log ${PROJECT_SOURCE_DIR}
)
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...