summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2011-08-04 01:37:01 (GMT)
committerDavid Cole <david.cole@kitware.com>2011-08-04 01:37:01 (GMT)
commit91704ef2dee3ad606a6cc0f1e03e6f254d211b8f (patch)
treed19d46b7208396b5003c85116f69cc2d48696f75 /Tests
parent14e54c4c449e2704799ab5283c6c6764472d5a0a (diff)
downloadCMake-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.txt13
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)