summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis Ibanez <luis.ibanez@gmail.com>2010-05-26 23:44:07 +0000
committerLuis Ibanez <luis.ibanez@gmail.com>2010-05-26 23:44:07 +0000
commit784cf66dc2b5c04b0a08b6acad44f3a2e0bf0420 (patch)
treedd550435d85b0d79756cda46f7ff1a5ad64e1c24
parent6c641471b295ddc8cc9aef0eb80e776d58b48d22 (diff)
ENH: Added custom configuration for CTest. This allows to fine tune
the selection of files for code coverage computation, and also allows to filter out acceptable compiler warnings.
-rw-r--r--CMakeLists.txt7
-rw-r--r--CTestCustom.cmake.in21
2 files changed, 28 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2139c6e5..0d8092bf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -50,6 +50,13 @@ SET (EXECUTABLE_OUTPUT_PATH ${OPENJPEG_BINARY_DIR}/bin CACHE PATH "Single output
SET (LIBRARY_OUTPUT_PATH ${OPENJPEG_BINARY_DIR}/bin CACHE PATH "Single output directory for building all libraries.")
MARK_AS_ADVANCED(LIBRARY_OUTPUT_PATH EXECUTABLE_OUTPUT_PATH)
+#-----------------------------------------------------------------------------
+# Setup file for setting custom ctest vars
+CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.cmake
+ @ONLY
+ )
#-----------------------------------------------------------------------------
# For the codec...
diff --git a/CTestCustom.cmake.in b/CTestCustom.cmake.in
new file mode 100644
index 00000000..00ad6670
--- /dev/null
+++ b/CTestCustom.cmake.in
@@ -0,0 +1,21 @@
+#
+# For further details regarding this file,
+# see http://www.vtk.org/Wiki/CMake_Testing_With_CTest#Customizing_CTest
+#
+
+SET (CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS 50)
+SET (CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 50)
+
+SET(CTEST_CUSTOM_COVERAGE_EXCLUDE
+ ${CTEST_CUSTOM_COVERAGE_EXCLUDE}
+
+ # Exclude files from the Testing directories
+ ".*/Testing/.*"
+ )
+
+SET(CTEST_CUSTOM_WARNING_EXCEPTION
+ ${CTEST_CUSTOM_WARNING_EXCEPTION}
+
+ # Suppress warning caused by intentional messages about deprecation
+ ".*warning,.* is deprecated"
+)