I think I have finally solved it!
My project was located in the OneDrive folder which is backed up. It probably was doing something CLion didn't like. I moved my project in my user folder and it works fine.
Thank you all for the help!