Kill tempfile.
Fix cmake errors.