~andreas-pokorny/mir/use-ld-preload-in-test-script

« back to all changes in this revision

Viewing changes to tools/vera++/CMakeLists.txt

  • Committer: Thomas Voß
  • Date: 2012-11-14 08:53:45 UTC
  • mto: This revision was merged to the branch mainline in revision 255.
  • Revision ID: thomas.voss@canonical.com-20121114085345-22edg7ih5e3u1cey
mir/tools: Add make target style_check if vera++ is available.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright © 2012 Canonical Ltd.
 
2
#
 
3
# This program is free software: you can redistribute it and/or modify
 
4
# it under the terms of the GNU General Public License version 3 as
 
5
# published by the Free Software Foundation.
 
6
#
 
7
# This program is distributed in the hope that it will be useful,
 
8
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
9
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
10
# GNU General Public License for more details.
 
11
#
 
12
# You should have received a copy of the GNU General Public License
 
13
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
14
#
 
15
# Authored by: Thomas Voß <thomas.voss@canonical.com>
 
16
 
 
17
find_program(VERA_EXECUTABLE vera++)
 
18
 
 
19
if(VERA_EXECUTABLE)
 
20
  message(STATUS "vera++ available - enabling make target style_check")
 
21
  
 
22
  add_custom_target(
 
23
    style_check
 
24
    COMMAND "find" "${CMAKE_SOURCE_DIR}/include" "-name" "'*.h'" "|" "xargs" "vera++" "-profile" "mir_vera_profile"
 
25
    COMMAND "find" "${CMAKE_SOURCE_DIR}/src" "-name" "'*.h'" "|" "xargs" "vera++" "-profile" "mir_vera_profile"
 
26
    COMMAND "find" "${CMAKE_SOURCE_DIR}/src" "-name" "'*.cpp'" "|" "xargs" "vera++" "-profile" "mir_vera_profile"
 
27
    COMMAND "find" "${CMAKE_SOURCE_DIR}/tests" "-name" "'*.h'" "|" "xargs" "vera++" "-profile" "mir_vera_profile"
 
28
    COMMAND "find" "${CMAKE_SOURCE_DIR}/tests" "-name" "'*.cpp'" "|" "xargs" "vera++" "-profile" "mir_vera_profile"
 
29
    WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
 
30
    )
 
31
else()
 
32
  message(WARNING "vera++ not available - disabling make target style_check")
 
33
endif(VERA_EXECUTABLE)
 
 
b'\\ No newline at end of file'