I have a project containing some unit test code using a template file as a resource. So I have something like this :
std::ofstream out { "../templates/file.cpp" };
But depending on where I run the unit tests it does not work. I use these commands :
cd _build
cmake ../src
make -j 4
ctest
Is it possible to manage properly resources with cmake (as we can do with Qt) ?
Or is it possible to specify to ctest the run directory ?
I tried the --build-run-dir
option like this :
ctest --build-run-dir ..
but the argument is not working.
Many thanks !