Merge lp:~michihenning/unity-scopes-api/add-check-for-cppcheck into lp:unity-scopes-api

Proposed by Michi Henning
Status: Merged
Approved by: Jussi Pakkanen
Approved revision: 7
Merged at revision: 11
Proposed branch: lp:~michihenning/unity-scopes-api/add-check-for-cppcheck
Merge into: lp:unity-scopes-api
Diff against target: 38 lines (+12/-9)
1 file modified
CMakeLists.txt (+12/-9)
To merge this branch: bzr merge lp:~michihenning/unity-scopes-api/add-check-for-cppcheck
Reviewer Review Type Date Requested Status
Jussi Pakkanen (community) Approve
Review via email: mp+169065@code.launchpad.net

Commit message

Added warning if cppcheck isn't found.

Description of the change

Added warning if cppcheck isn't found.

To post a comment you must log in.
Revision history for this message
Jussi Pakkanen (jpakkane) wrote :

Looks good. The only think to consider is whether the not found message should be a STATUS or WARNING. After all, cppcheck is not really required for the system to build and work. I'm fine either way.

review: Approve
Revision history for this message
Michi Henning (michihenning) wrote :

Warning seems right to me. Basically says "not every feature of the build environment will be available, but you can still build".

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2013-05-30 13:59:48 +0000
+++ CMakeLists.txt 2013-06-12 21:44:29 +0000
@@ -33,14 +33,18 @@
3333
34# Static C++ checks34# Static C++ checks
3535
36set(cppcheck_flags --inline-suppr --enable=all -q --error-exitcode=2)36find_program(CPPCHECK_COMMAND NAMES cppcheck)
37set(cppcheck_flags ${cppcheck_flags} --template '{file}({line}): {severity} ({id}): {message}')37if (CPPCHECK_COMMAND)
3838 set(CPPCHECK_COMMAND_OPTIONS --check-config --inline-suppr --enable=all -q --error-exitcode=2)
39add_custom_target(cppcheck COMMAND cppcheck ${cppcheck_flags}39 set(CPPCHECK_COMMAND_OPTIONS ${CPPCHECK_COMMAND_OPTIONS} --template '{file}({line}): {severity} ({id}): {message}')
40 ${CMAKE_SOURCE_DIR}/src40 add_custom_target(cppcheck COMMAND ${CPPCHECK_COMMAND} ${CPPCHECK_COMMAND_OPTIONS}
41 ${CMAKE_SOURCE_DIR}/test41 ${CMAKE_SOURCE_DIR}/src
42 ${CMAKE_BINARY_DIR}/test42 ${CMAKE_SOURCE_DIR}/test
43)43 ${CMAKE_BINARY_DIR}/test
44 )
45else()
46 message(WARNING "Cannot find cppcheck: cppcheck target will not be available")
47endif()
4448
45#49#
46# Definitions for testing with valgrind.50# Definitions for testing with valgrind.
@@ -134,7 +138,6 @@
134# Documentation138# Documentation
135#139#
136140
137message("lib: ${UNITY_SCOPES_LIB}")
138find_package(Doxygen)141find_package(Doxygen)
139find_program(DOT_EXECUTABLE dot /usr/bin)142find_program(DOT_EXECUTABLE dot /usr/bin)
140if (NOT DOXYGEN_FOUND OR NOT DOT_EXECUTABLE)143if (NOT DOXYGEN_FOUND OR NOT DOT_EXECUTABLE)

Subscribers

People subscribed via source and target branches

to all changes: