Tests: Add a KWStyle test, equivalent to the make StyleCheck target

This commit is contained in:
David Cole 2011-08-03 21:37:01 -04:00
parent 14e54c4c44
commit 91704ef2de
1 changed files with 13 additions and 0 deletions

View File

@ -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)