This is an easy fix, the tests' CMakeLists.txt just need to be updated to use the same variables as the top-level CMakeLists.txt.