Cannot locate CTest configuration

The name of the picture


Cannot locate CTest configuration



I am trying to perform a coverage analysis of a project in which I use CMake+CTest. I have created a simple TestingScript.cmake that looks like:


set(CTEST_SOURCE_DIRECTORY .)
set(CTEST_BINARY_DIRECTORY build_coverage)

ctest_start(TestCoverage)

ctest_coverage(BUILD ${CTEST_BINARY_DIR})



and am trying to run it with:


doriad@david-desktop:~/build/Examples/Coverage$ ctest -S ~/src/Examples/Coverage/TestingScript.cmake
Cannot locate CTest configuration: in BuildDirectory: /home/doriad/build/Examples/Coverage/build_coverage/CTestConfig.cmake
Cannot locate CTest configuration: in SourceDirectory: /home/doriad/build/Examples/Coverage/CTestConfig.cmake
Cannot find any coverage files. Ignoring Coverage request.



What do I need to do to produce this CTestConfig.cmake file that it is looking for?




1 Answer
1



The file CTestConfig.cmake is usually generated by CDash. While logged in to CDash, select Settings > Project > Miscellaneous > Download CTestConfig. The file holds the configuration to submit the results to a dashboard server.


CTestConfig.cmake



The default settings of the module are to submit the dashboard to Kitware's Public Dashboard, where you can register your project for free.



In order to submit to some other server, CTestConfig.cmake in the top level directory of your source, and set your own dashboard preferences. If you are using a CDash server, you can download a preconfigured file from the respective project page on that server (Settings / Project, tab Miscellaneous).


CTestConfig.cmake



Source: https://gitlab.kitware.com/cmake/community/wikis/doc/ctest/Testing-With-CTest



Another problem is that you have no coverage files to submit since you skipped the build and test steps in your testing script.






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

How to scale/resize CVPixelBufferRef in objective C, iOS

Stripe::AuthenticationError No API key provided. Set your API key using “Stripe.api_key = ”

SVG with two text elements. When one resizes due to textLength - how to resize the other one to the same character size