I am using CMake to generate Visual Studio project files. I want to run the test executable after setting the PATH environment variable so that it is able to load the requir
Just spotted this question now. To debug cmake files I use
MESSAGE( STATUS "static text ${variable}" )
I have never had to set the path get my tests to run. Are you using CTest? It looks like the link you are following is used with ctest.
If I was trying to get this to work I would use set_tests_properties explicitly first.
set_tests_properties(SomeTest PROPERTIES ENVIRONMENT "PATH=c:\somedir;c:\otherdir")
Then make it more general.