[Cmake-commits] CMake branch, next, updated. v2.8.5-1857-gec84345
David Cole
david.cole at kitware.com
Wed Sep 7 19:19:46 EDT 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via ec8434567837e8305a2d67734d49f0b70ad7fe3b (commit)
via 3a0d63242d959871b8f047e7f7ee1531f113f436 (commit)
from abf88b50008f60c76aeaa751f2ee20ceab2114c3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ec8434567837e8305a2d67734d49f0b70ad7fe3b
commit ec8434567837e8305a2d67734d49f0b70ad7fe3b
Merge: abf88b5 3a0d632
Author: David Cole <david.cole at kitware.com>
AuthorDate: Wed Sep 7 19:19:43 2011 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Sep 7 19:19:43 2011 -0400
Merge topic 'add-kwstyle-test' into next
3a0d632 KWStyle Test: Activate by default if KWStyle is found
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3a0d63242d959871b8f047e7f7ee1531f113f436
commit 3a0d63242d959871b8f047e7f7ee1531f113f436
Author: David Cole <david.cole at kitware.com>
AuthorDate: Wed Sep 7 19:04:44 2011 -0400
Commit: David Cole <david.cole at kitware.com>
CommitDate: Wed Sep 7 19:04:44 2011 -0400
KWStyle Test: Activate by default if KWStyle is found
Re-arrange the logic to look for KWStyle in the typical install
locations and under the Dashboards/Support directory for the
typical CMake dashboard machine. If it's there, turn on CMAKE_USE_KWSTYLE
by default, thereby activating the KWStyle related custom targets
and the KWStyle test.
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)
-
-----------------------------------------------------------------------
Summary of changes:
Utilities/KWStyle/CMakeLists.txt | 28 ++++++++++++++++++++++------
1 files changed, 22 insertions(+), 6 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list