Fix CMake according to the library.
Add a test of external solver.