Remove unnecessary cppcheck include-path
[alexxy/gromacs.git] / tests / CppCheck.cmake
index dbb33e2e82b923d4ee7bd3a84795ff39a679af8a..2b3e93386c63a4751ce8cbd4034f7923583e5c75 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2013, by the GROMACS development team, led by
+# Copyright (c) 2013,2014, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -57,6 +57,8 @@ if (CPPCHECK_EXECUTABLE AND UNIX)
         ${CMAKE_SOURCE_DIR}/src/external/*.c
         ${CMAKE_SOURCE_DIR}/src/external/*.cpp
         ${CMAKE_SOURCE_DIR}/src/external/*.cu
+        ${CMAKE_SOURCE_DIR}/src/gromacs/selection/scanner.cpp
+        ${CMAKE_SOURCE_DIR}/src/gromacs/selection/parser.cpp
         )
     list(REMOVE_ITEM _inputfiles ${_files_to_ignore})
 
@@ -68,14 +70,15 @@ if (CPPCHECK_EXECUTABLE AND UNIX)
         set(_outputopt --xml)
     endif()
     set(_common_flags
-        --enable=style -DLINUX
-        -I src/gromacs/legacyheaders -I src
-        -I ${CMAKE_BINARY_DIR}/src -I ${CMAKE_BINARY_DIR}/src/gromacs/utility
+        --enable=style -DLINUX -DHAVE_UNISTD_H
+        -I src
+        -I src/external/thread_mpi/include
+        -I src/external/tng_io/include
+        -I ${CMAKE_BINARY_DIR}/src
         --quiet
+        --inline-suppr
         ${_outputopt})
     set(_c_flags
-        -I src/gromacs/gmxpreprocess
-        -I src/programs/mdrun
         --suppress=variableScope
         --suppress=unnecessaryForwardDeclaration
         --suppress=unusedVariable
@@ -84,15 +87,22 @@ if (CPPCHECK_EXECUTABLE AND UNIX)
         --suppress=invalidscanf
         --suppress=sizeofCalculation
         --suppress=missingInclude:src/programs/mdrun/gmx_gpu_utils/gmx_gpu_utils.cu
-        --inline-suppr)
+        --suppress=*:src/external/Random123-1.08/include/Random123/features/compilerfeatures.h
+        --suppress=assignIfError:src/gromacs/mdlib/nbnxn_atomdata.c #Ticket 5695
+        --suppress=invalidPointerCast:src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_kernel.cuh
+        --suppress=passedByValue:src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_kernel.cuh
+        --suppress=passedByValue:src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_kernel_utils.cuh
+        ) 
     set(_cxx_flags
         -D__cplusplus
         --suppress=variableScope
         --suppress=unnecessaryForwardDeclaration
         --suppress=invalidscanf:src/gromacs/fileio/matio.cpp
-        --suppress=invalidscanf:src/gromacs/gmxlib/xvgr.cpp
+        --suppress=invalidscanf:src/gromacs/fileio/xvgr.cpp
+        --suppress=invalidscanf:src/gromacs/topology/index.cpp
         --suppress=invalidscanf:src/gromacs/gmxpreprocess/pdb2top.cpp
-        --suppress=*:src/gromacs/selection/scanner.cpp)
+        --suppress=passedByValue:src/gromacs/simd/tests/*
+        )
 
     # This list will hold the list of all files with cppcheck errors
     # (one per input file)