Skip to content

Commit

Permalink
Adding much of the project to cppcheck target. Refs #4368.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterfpeterson committed Dec 29, 2011
1 parent ac72e05 commit 72dfd23
Show file tree
Hide file tree
Showing 20 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions Code/Mantid/Framework/API/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ endif ()
ADD_PRECOMPILED_HEADER( inc/MantidAPI/PrecompiledHeader.h MantidAPI src/PrecompiledHeader.cpp SRC_FILES INC_FILES )
# Add the target for this directory
add_library ( API ${SRC_FILES} ${INC_FILES})
add_cppcheck ( API )
# Set the name of the generated library
set_target_properties ( API PROPERTIES OUTPUT_NAME MantidAPI
COMPILE_DEFINITIONS IN_MANTID_API )
Expand Down
1 change: 1 addition & 0 deletions Code/Mantid/Framework/Algorithms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@ endif(UNITY_BUILD)
ADD_PRECOMPILED_HEADER( inc/MantidAlgorithms/PrecompiledHeader.h MantidAlgorithms src/PrecompiledHeader.cpp SRC_FILES INC_FILES )
# Add the target for this directory
add_library ( Algorithms ${SRC_FILES} ${INC_FILES})
add_cppcheck ( Algorithms )
# Set the name of the generated library
set_target_properties ( Algorithms PROPERTIES OUTPUT_NAME MantidAlgorithms )
# Add to the 'Framework' group in VS
Expand Down
1 change: 1 addition & 0 deletions Code/Mantid/Framework/Crystal/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ endif(UNITY_BUILD)

# Add the target for this directory
add_library ( Crystal ${SRC_FILES} ${INC_FILES})
add_cppcheck( Crystal )
# Set the name of the generated library
set_target_properties ( Crystal PROPERTIES OUTPUT_NAME MantidCrystal )
# Add to the 'Framework' group in VS
Expand Down
1 change: 1 addition & 0 deletions Code/Mantid/Framework/CurveFitting/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ endif(UNITY_BUILD)
ADD_PRECOMPILED_HEADER( inc/MantidCurveFitting/PrecompiledHeader.h MantidCurveFitting src/PrecompiledHeader.cpp SRC_FILES INC_FILES )
# Add the target for this directory
add_library ( CurveFitting ${SRC_FILES} ${INC_FILES})
add_cppcheck( CurveFitting )
# Set the name of the generated library
set_target_properties ( CurveFitting PROPERTIES OUTPUT_NAME MantidCurveFitting )
# Add to the 'Framework' group in VS
Expand Down
1 change: 1 addition & 0 deletions Code/Mantid/Framework/DataHandling/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ endif(UNITY_BUILD)
ADD_PRECOMPILED_HEADER( inc/MantidDataHandling/PrecompiledHeader.h MantidDataHandling src/PrecompiledHeader.cpp SRC_FILES INC_FILES )
# Add the target for this directory
add_library ( DataHandling ${SRC_FILES} ${INC_FILES})
add_cppcheck( DataHandling )
# Set the name of the generated library
set_target_properties ( DataHandling PROPERTIES OUTPUT_NAME MantidDataHandling )
# Add to the 'Framework' group in VS
Expand Down
1 change: 1 addition & 0 deletions Code/Mantid/Framework/DataObjects/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ endif(UNITY_BUILD)
ADD_PRECOMPILED_HEADER( inc/MantidDataObjects/PrecompiledHeader.h MantidDataObjects src/PrecompiledHeader.cpp SRC_FILES INC_FILES )
# Add the target for this directory
add_library ( DataObjects ${SRC_FILES} ${INC_FILES})
add_cppcheck( DataObjects )
# Set the name of the generated library
set_target_properties ( DataObjects PROPERTIES OUTPUT_NAME MantidDataObjects
COMPILE_DEFINITIONS IN_MANTID_DATA_OBJECTS )
Expand Down
1 change: 1 addition & 0 deletions Code/Mantid/Framework/GPUAlgorithms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ set ( KERNEL_FILES

# Add the target for this directory
add_library ( GPUAlgorithms ${SRC_FILES} ${INC_FILES} )
add_cppcheck( GPUAlgorithms )
# Set the name of the generated library
set_target_properties ( GPUAlgorithms PROPERTIES OUTPUT_NAME MantidGPUAlgorithms )
# Add to the 'Framework' group in VS
Expand Down
1 change: 1 addition & 0 deletions Code/Mantid/Framework/Geometry/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ endif ()
ADD_PRECOMPILED_HEADER( inc/MantidGeometry/PrecompiledHeader.h MantidGeometry src/PrecompiledHeader.cpp SRC_FILES INC_FILES )
# Add the target for this directory
add_library ( Geometry ${SRC_FILES} ${INC_FILES} )
add_cppcheck( Geometry )
# Set the name of the generated library
set_target_properties ( Geometry PROPERTIES OUTPUT_NAME MantidGeometry
COMPILE_DEFINITIONS IN_MANTID_GEOMETRY )
Expand Down
1 change: 1 addition & 0 deletions Code/Mantid/Framework/ICat/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ add_definitions ( -DWITH_OPENSSL -DWITH_NONAMESPACES )
ADD_PRECOMPILED_HEADER( inc/MantidICat/PrecompiledHeader.h MantidICat src/PrecompiledHeader.cpp SRC_FILES INC_FILES )
# Add the target for this directory
add_library ( ICat ${SRC_FILES} ${INC_FILES})
add_cppcheck( ICat src/GSoapGenerated.cpp src/GSoapGenerated)
# Set the name of the generated library
set_target_properties ( ICat PROPERTIES OUTPUT_NAME MantidICat
COMPILE_DEFINITIONS IN_MANTID_ICAT )
Expand Down
1 change: 1 addition & 0 deletions Code/Mantid/Framework/Kernel/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ endif(UNITY_BUILD)
ADD_PRECOMPILED_HEADER ( inc/MantidKernel/PrecompiledHeader.h MantidKernel src/PrecompiledHeader.cpp SRC_FILES INC_FILES )
# Add the target for this directory
add_library ( Kernel ${SRC_FILES} ${INC_FILES} )
add_cppcheck( Kernel )
# Set the name of the generated library
set_target_properties ( Kernel PROPERTIES OUTPUT_NAME MantidKernel
COMPILE_DEFINITIONS "IN_MANTID_KERNEL;PSAPI_VERSION=1" )
Expand Down
1 change: 1 addition & 0 deletions Code/Mantid/Framework/MDAlgorithms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ endif(UNITY_BUILD)
ADD_PRECOMPILED_HEADER( inc/MantidMDAlgorithms/PrecompiledHeader.h MantidMDAlgorithms src/PrecompiledHeader.cpp SRC_FILES INC_FILES )
# Add the target for this directory
add_library ( MDAlgorithms ${SRC_FILES} ${INC_FILES})
add_cppcheck( MDAlgorithms )
# Set the name of the generated library
set_target_properties ( MDAlgorithms PROPERTIES OUTPUT_NAME MantidMDAlgorithms
COMPILE_DEFINITIONS IN_MANTID_MDALGORITHMS )
Expand Down
1 change: 1 addition & 0 deletions Code/Mantid/Framework/MDEvents/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ endif(UNITY_BUILD)
ADD_PRECOMPILED_HEADER( inc/MantidMDEvents/PrecompiledHeader.h MantidMDEvents src/PrecompiledHeader.cpp SRC_FILES INC_FILES )
# Add the target for this directory
add_library ( MDEvents ${SRC_FILES} ${INC_FILES})
add_cppcheck( MDEvents )
# Set the name of the generated library
set_target_properties ( MDEvents PROPERTIES OUTPUT_NAME MantidMDEvents
COMPILE_DEFINITIONS IN_MANTID_MDEVENT )
Expand Down
1 change: 1 addition & 0 deletions Code/Mantid/Framework/MPIAlgorithms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ set ( TEST_FILES test/BroadcastWorkspaceTest.h

# Add the target for this directory
add_library ( MPIAlgorithms ${SRC_FILES} ${INC_FILES} )
add_cppcheck( MPIAlgorithms )
# Set the name of the generated library
set_target_properties ( MPIAlgorithms PROPERTIES OUTPUT_NAME MantidMPIAlgorithms )
# Add to the 'Framework' group in VS
Expand Down
1 change: 1 addition & 0 deletions Code/Mantid/Framework/MatlabAPI/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ add_definitions ( -DIN_MANTID_MATLAB_API -DMATLAB_MEX_FILE=1 )
include_directories ( inc )
include_directories ( ${MATLAB_INCLUDE_DIR} ${MATLAB_EXTERN_SRC} )
add_library ( MatlabAPI ${SRC_FILES} ${INC_FILES})
add_cppcheck( MatlabAPI )
# Set the name of the generated library
set_target_properties ( MatlabAPI PROPERTIES OUTPUT_NAME MantidMatlabAPI )
# Add to the 'Framework' group in VS
Expand Down
1 change: 1 addition & 0 deletions Code/Mantid/Framework/Nexus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ add_definitions ( -DIN_NEXUS_CPP_LIBRARY )

# Add the target for this directory
add_library ( Nexus ${SRC_FILES} ${INC_FILES})
add_cppcheck( Nexus )
# Set the name of the generated library
set_target_properties ( Nexus PROPERTIES OUTPUT_NAME MantidNexus
COMPILE_DEFINITIONS IN_MANTID_NEXUS )
Expand Down
1 change: 1 addition & 0 deletions Code/Mantid/Framework/NexusCPP/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ add_definitions ( -DIN_NEXUS_CPP_LIBRARY )

# Add the target for this directory
add_library ( NexusCPP ${SRC_FILES} ${INC_FILES})
add_cppcheck( NexusCPP )
# Set the name of the generated library
set_target_properties ( NexusCPP PROPERTIES OUTPUT_NAME MantidNexusCPP
COMPILE_DEFINITIONS IN_MANTID_NEXUSCPP )
Expand Down
2 changes: 2 additions & 0 deletions Code/Mantid/Framework/PythonAPI/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,11 @@ endforeach ( PYFILE )
###########################################################################

add_library ( PythonAPI ${SRC_FILES} ${INC_FILES} ${BOOST_SRC} ${PYTHON_INSTALL_FILES} )
add_cppcheck( PythonAPI )
if ( UNIX )
set ( DLOPEN_SRC src/dlopen.c )
add_library ( dlopen ${DLOPEN_SRC} )
add_cppcheck( dlopen )
if ( APPLE )
# and in .so on the Mac
# Need to remove OpenMP
Expand Down
1 change: 1 addition & 0 deletions Code/Mantid/Framework/WorkflowAlgorithms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ set ( TEST_PY_FILES test/EQSANSQ2DTest.py test/EQSANSSensitivityCorrectionTest.p
ADD_PRECOMPILED_HEADER( inc/MantidWorkflowAlgorithms/PrecompiledHeader.h MantidWorkflowAlgorithms src/PrecompiledHeader.cpp SRC_FILES INC_FILES )
# Add the target for this directory
add_library ( WorkflowAlgorithms ${SRC_FILES} ${INC_FILES})
add_cppcheck( WorkflowAlgorithms )
# Set the name of the generated library
set_target_properties ( WorkflowAlgorithms PROPERTIES OUTPUT_NAME MantidWorkflowAlgorithms )
# Add to the 'Framework' group in VS
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/MantidPlot/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ add_executable ( MantidPlot ${WIN_CONSOLE} MACOSX_BUNDLE ${ALL_SRC} src/main.cpp
${INC_FILES} ${QTIPLOT_C_SRC} ${UI_HDRS}
${RES_FILES} ${MANTID_RC_FILE}
)

add_cppcheck ( MantidPlot )

# Library dependencies
target_link_libraries ( MantidPlot
Expand Down
1 change: 1 addition & 0 deletions Code/Mantid/MantidQt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ include_directories ( ${CMAKE_CURRENT_BINARY_DIR}/SliceViewer ) # to find the ui

# This creates the target library, just for python bindings
add_library ( mantidqtpython MODULE ${SIP_SRC} )
add_cppcheck( mantidqtpython )

if(WIN32)
# Windows: Python library name needs to end in .pyd for Windows
Expand Down

0 comments on commit 72dfd23

Please sign in to comment.