XCode hangs when loading project

I have a C++ command line project that was working fine. I installed SDL2-2.28.5.dmg and wanted to experiment using SDL2 in my app. However, after I added the framework to my project XCode would hang whenever I loaded the project. By hang I mean that it would start loading the project and never finish.

I eventually found that I could fix this by opening the xcodeproj file by first selecting Show Package Contents in Finder and then moving project.xcworkspace to trash. After doing so, I could then double click on the xcodeproj file and XCode would then load the project without hanging.

However, even though XCode has loaded the project there is a message at the top that says Indexing Open Quickly Content. It seems to be stuck at about 40%. Also, there is another message at the top that says Loading... with a spinner next to it. My fans are also blowing pretty hard while this is happening.

Now that I have waited several minutes, I see that XCode has made no progress on Indexing Open Quickly Content and is now hung again.

Coming from a Windows development background, it is astounding to me how fragile XCode is.