diff options
author | David Cole <david.cole@kitware.com> | 2011-08-04 01:37:01 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2011-08-04 01:37:01 (GMT) |
commit | 91704ef2dee3ad606a6cc0f1e03e6f254d211b8f (patch) | |
tree | d19d46b7208396b5003c85116f69cc2d48696f75 /Tests | |
parent | 14e54c4c449e2704799ab5283c6c6764472d5a0a (diff) | |
download | CMake-91704ef2dee3ad606a6cc0f1e03e6f254d211b8f.zip CMake-91704ef2dee3ad606a6cc0f1e03e6f254d211b8f.tar.gz CMake-91704ef2dee3ad606a6cc0f1e03e6f254d211b8f.tar.bz2 |
Tests: Add a KWStyle test, equivalent to the make StyleCheck target
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CMakeLists.txt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 4bf83b7..ee38fd0 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -2073,6 +2073,19 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ --test-command IncludeDirectories) LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/IncludeDirectories") + IF(CMAKE_USE_KWSTYLE AND KWSTYLE_EXECUTABLE) + # The "make StyleCheck" command line as a test. If the test fails, look + # for lines like "Error #0 (624) Line length exceed 88 (max=79)" in the + # output to find where the style errors are... + ADD_TEST(KWStyle ${KWSTYLE_EXECUTABLE} + -xml ${CMake_BINARY_DIR}/CMake.kws.xml + -o ${CMake_SOURCE_DIR}/Utilities/KWStyle/CMakeOverwrite.txt + -v + -D ${CMake_BINARY_DIR}/CMakeKWSFiles.txt + ) + SET_TESTS_PROPERTIES(KWStyle PROPERTIES + WORKING_DIRECTORY ${CMake_BINARY_DIR}/Utilities/KWStyle) + ENDIF() ENDIF(BUILD_TESTING) SUBDIRS(CMakeTests) |