cmake: exec_program is deprecated

And make_directory too