What character encoding does configure_file use?

I’m currently working on contributing to Descent 3. Descent 3 is an open-source project that uses CMake. Descent 3’s source code is encoded in UTF-8 without any BOMs.

I’m currently working on a pull request that uses CMake’s configure_file command. When I first created the pull request, I just used configure_file without thinking about it, but now I’m realizing that mojibake might be possible. What character encoding does configure_file use? Is there anyway to make sure that configure_file uses UTF-8 for both the input file and the output file?