summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2011-09-13 18:32:52 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2011-09-13 18:32:52 (GMT)
commita0ec7a00d5fe1a8b65329545f24080af581705be (patch)
tree4ac9e9a2cc3c14e836bc3a00506ca965e32d1a86 /Tests
parentc7021203de8a3632d7f33bc812b41e88f5bc86f9 (diff)
parent3a0d63242d959871b8f047e7f7ee1531f113f436 (diff)
downloadCMake-a0ec7a00d5fe1a8b65329545f24080af581705be.zip
CMake-a0ec7a00d5fe1a8b65329545f24080af581705be.tar.gz
CMake-a0ec7a00d5fe1a8b65329545f24080af581705be.tar.bz2
Merge topic 'add-kwstyle-test'
3a0d632 KWStyle Test: Activate by default if KWStyle is found 91704ef 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 7f83a47..949df00 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -2122,6 +2122,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)