ENH: Added custom configuration for CTest. This allows to filter out
authorLuis Ibanez <luis.ibanez@gmail.com>
Wed, 26 May 2010 23:40:46 +0000 (23:40 +0000)
committerLuis Ibanez <luis.ibanez@gmail.com>
Wed, 26 May 2010 23:40:46 +0000 (23:40 +0000)
     files for Code Coverage, and to filter out acceptable warnings
     messages.

CMakeLists.txt
CTestCustom.cmake.in [new file with mode: 0644]

index 38928452c579b4f183010f86b26e6faf971fc28b..e22dd3bbc92bff5916f5e34aaa8c6cf767588082 100644 (file)
@@ -44,6 +44,14 @@ SET(OPENJPEG_LIBRARY_PROPERTIES
 # Test for some required system information.
 INCLUDE (${CMAKE_ROOT}/Modules/CMakeBackwardCompatibilityC.cmake)
 
+#-----------------------------------------------------------------------------
+# Setup file for setting custom ctest vars
+CONFIGURE_FILE(
+  ${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.cmake.in
+  ${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.cmake
+  @ONLY
+  )
+
 #-----------------------------------------------------------------------------
 # OpenJPEG build configuration options.
 OPTION(BUILD_SHARED_LIBS "Build OpenJPEG with shared libraries." OFF)
diff --git a/CTestCustom.cmake.in b/CTestCustom.cmake.in
new file mode 100644 (file)
index 0000000..00ad667
--- /dev/null
@@ -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"
+)