Let us now discuss how to port tests from the reference build to our CMake build.
Porting tests
Getting started
If the project that is being ported contains a test target or any form of automated testing or test scripts, the first step will again be to run the traditional test step and record the commands used. For the Vim project, the place to start is src/testdir/Makefile. It will probably make sense to define tests on the CMake side close to src/testdir/Makefile and the test scripts, and we will choose to define tests in src/testdir/CMakeLists.txt. To process such a file, we must reference it in src/CMakeLists.txt:
add_subdirectory(testdir)
We should also enable the test target in the top-level CMakeLists.txt, right...