No, please not configuring the same file twice. The fix should be to configure it to CMAKE_BINARY_DIR in the toplevel CMakeLists.txt