[CMake] [CTest] request information on usage of CTEST_CUSTOM_COVERAGE_EXCLUDE and CTestCustom.cmake

m.hergarden m.hergarden at euphoria-it.nl
Wed Feb 8 03:02:23 EST 2012


I would like to exclude third party header files from the coverage 
output. We're using ctest, cmake (version 2.8.5) and cdash, all on 
Linux. The archive layout is as follows:

/
/Code/
/Code/Application/
/Code/Application/src/
/Code/Third-Party/
/Code/Third-Party/boost/
/Code/Third-Party/boost/boost-1-47-0/
/Code/Third-Party/boost/boost-1-47-0/include/
/Code/Third-Party/boost/boost-1-47-0/lib/
/Code/Build/

The /Code/Build directory contains a script that is called using ctest 
-S /Code/Build/buildscript. The /Code directory contains a 
CMakeLists.txt, a CTestConfig.cmake and a CTestCustom.cmake file.

The CMakeLists.txt file in /Code/Application/src/ uses 
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/CTestCustom.cmake 
${CMAKE_BINARY_DIR}/CTestCustom.cmake COPYONLY) to copy the 
CTestCustom.cmake file to the toplevel of the builddirectory. The file 
does indeed end up in the toplevel builddirectory.

The CTestCustom.cmake file is as follows:

SET(CTEST_CUSTOM_COVERAGE_EXCLUDE
  ${CTEST_CUSTOM_COVERAGE_EXCLUDE}
  "/Code/Third-Party/*"
  )

I compile all code with the following flags:
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")

Although coverage does get sent to the CDash dashboard, the results 
contain more than I would like to see. I would like to exclude the .hpp 
files from the /Code/Third-Party/boost/boost-1-47-0/include/ directory 
from the dashboard.

My questions:

-- Is the /Code/Third-Party/* expression recursive, or do I need to add 
the full path to the include directory of boost?
-- Does the '/' at the front of the path mean the CMAKE_SOURCE_DIR?

Any advice or pointers to information on how to achieve the exclusion 
would be greatly appreciated.

With kind regards,
Micha Hergarden
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120208/c4bf96ae/attachment.htm>


More information about the CMake mailing list