summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/CPack.cmake2
-rw-r--r--Source/kwsys/kwsysDateStamp.cmake2
-rw-r--r--Templates/CPackConfig.cmake.in2
-rw-r--r--Tests/CMakeLists.txt13
-rw-r--r--Utilities/KWStyle/CMakeLists.txt28
5 files changed, 38 insertions, 9 deletions
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake
index d82de93..2cc27cf 100644
--- a/Modules/CPack.cmake
+++ b/Modules/CPack.cmake
@@ -215,7 +215,7 @@
#
# CPACK_INSTALL_COMMANDS - Extra commands to install components.
#
-# CPACK_INSTALL_DIRECTORIES - Extra directories to install.
+# CPACK_INSTALLED_DIRECTORIES - Extra directories to install.
#
#=============================================================================
diff --git a/Source/kwsys/kwsysDateStamp.cmake b/Source/kwsys/kwsysDateStamp.cmake
index a47750e..29d31bd 100644
--- a/Source/kwsys/kwsysDateStamp.cmake
+++ b/Source/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@ SET(KWSYS_DATE_STAMP_YEAR 2011)
SET(KWSYS_DATE_STAMP_MONTH 09)
# KWSys version date day component. Format is DD.
-SET(KWSYS_DATE_STAMP_DAY 12)
+SET(KWSYS_DATE_STAMP_DAY 13)
diff --git a/Templates/CPackConfig.cmake.in b/Templates/CPackConfig.cmake.in
index 0406392..7150feb 100644
--- a/Templates/CPackConfig.cmake.in
+++ b/Templates/CPackConfig.cmake.in
@@ -5,7 +5,7 @@
# CPACK_INSTALL_CMAKE_PROJECTS - For each project (path, name, component)
# CPACK_CMAKE_GENERATOR - CMake Generator used for the projects
# CPACK_INSTALL_COMMANDS - Extra commands to install components
-# CPACK_INSTALL_DIRECTORIES - Extra directories to install
+# CPACK_INSTALLED_DIRECTORIES - Extra directories to install
# CPACK_PACKAGE_DESCRIPTION_FILE - Description file for the package
# CPACK_PACKAGE_DESCRIPTION_SUMMARY - Summary of the package
# CPACK_PACKAGE_EXECUTABLES - List of pairs of executables and labels
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)
diff --git a/Utilities/KWStyle/CMakeLists.txt b/Utilities/KWStyle/CMakeLists.txt
index 4803ffa..5b0c84e 100644
--- a/Utilities/KWStyle/CMakeLists.txt
+++ b/Utilities/KWStyle/CMakeLists.txt
@@ -12,17 +12,34 @@
#-----------------------------------------------------------------------------
# CMake uses KWStyle for checking the coding style
-OPTION(CMAKE_USE_KWSTYLE "Run KWStyle in order to check for violations of the coding standard." OFF)
-MARK_AS_ADVANCED(CMAKE_USE_KWSTYLE)
-IF(CMAKE_USE_KWSTYLE)
- FIND_PROGRAM(KWSTYLE_EXECUTABLE
+# Search for a built-from-source KWStyle under Dashboards/Support on a typical
+# dashboard machines:
+#
+SET(home "$ENV{HOME}")
+IF(NOT home)
+ STRING(REPLACE "\\" "/" home "$ENV{USERPROFILE}")
+ENDIF()
+
+FIND_PROGRAM(KWSTYLE_EXECUTABLE
NAMES KWStyle
PATHS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Kitware Inc.\\KWStyle 1.0.0]/bin"
+ "${home}/Dashboards/Support/KWStyle/bin"
)
- MARK_AS_ADVANCED(KWSTYLE_EXECUTABLE)
+MARK_AS_ADVANCED(KWSTYLE_EXECUTABLE)
+
+SET(CMAKE_USE_KWSTYLE_DEFAULT OFF)
+IF(KWSTYLE_EXECUTABLE)
+ SET(CMAKE_USE_KWSTYLE_DEFAULT ON)
+ENDIF()
+OPTION(CMAKE_USE_KWSTYLE
+ "Add StyleCheck target and KWStyle test: run KWStyle to check for coding standard violations."
+ ${CMAKE_USE_KWSTYLE_DEFAULT})
+MARK_AS_ADVANCED(CMAKE_USE_KWSTYLE)
+
+IF(CMAKE_USE_KWSTYLE)
OPTION(KWSTYLE_USE_VIM_FORMAT "Set KWStyle to generate errors with a VIM-compatible format." OFF)
OPTION(KWSTYLE_USE_MSVC_FORMAT "Set KWStyle to generate errors with a VisualStudio-compatible format." OFF)
MARK_AS_ADVANCED(KWSTYLE_USE_VIM_FORMAT)
@@ -59,4 +76,3 @@ IF(CMAKE_USE_KWSTYLE)
ADD_CUSTOM_TARGET(StyleCheck DEPENDS ${CMake_BINARY_DIR}/KWStyleReport.txt)
ENDIF(CMAKE_USE_KWSTYLE)
-