0

I currently have a rather large codebase that builds a number of applications each as their own seperate projects underneath one global project.

I want to be able to run CTest on this global project as part of the regular build, so if a user tries to build the codebase ("make", "make -j4", "make -C gui") that the CTest framework will always run at the very end of the project, once every target under the main project has been completed.

Is it possible to do this? I considered whether it would be possible to add another project and use add_custom_command and make it depend on the global project so that it would only run after that had completed. However, I don't think this is possible?

Are there any suggestions on a better way to achieve this? My main goal is that once a user runs "make", the very last step must be to run CTest, regardless of if you build an individual directory, target or using multiple jobs.

0 Answers0