Skip to content

Commit

Permalink
Add target's inc directory to cppcheck. Refs #4368.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterfpeterson committed Dec 29, 2011
1 parent b0b0827 commit 42babb5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Code/Mantid/Build/CMake/FindCppcheck.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,11 @@ function(add_cppcheck _name) # additional arguments are files to ignore
return() # nothing to check
endif ( NOT _files)

# set the standard arguments
set ( _cppcheck_args )
list ( APPEND _cppcheck_args ${CPPCHECK_TEMPLATE_ARG} ${CPPCHECK_ARGS} )
list ( APPEND _cppcheck_args ${CPPCHECK_TEMPLATE_ARG} ${CPPCHECK_ARGS} "-I" "${CMAKE_CURRENT_SOURCE_DIR}/inc" )

# add the target
if (CPPCHECK_GENERATE_XML )
add_custom_target( cppcheck_${_name}
COMMAND ${CPPCHECK_EXECUTABLE} ${_cppcheck_args} --xml --xml-version=2 ${_files} 2> ${CMAKE_BINARY_DIR}/cppcheck-${_name}.xml
Expand Down

0 comments on commit 42babb5

Please sign in to comment.