CMakeLists.txt: Rebuild tests when core library changes