improve CTest script

* Make passing configuration options more flexible
* Fix CMake invocation