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
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to