[CMake and CPMAddPackage] Can't compile source code offline

I am trying to compile Sonic Robo Blast 2.
At some point, the game started using CPMAddPackage, which made the process significantly more difficult.
For the previous version, I managed to circumnavigate around it by using CMakeLists from an older version. However, the new update added even more lines related to CPMAddPackage, to a point where I can no longer use the same hack.
Which brings me to the main question, is it possible to somehow compile OBS packages online? Perhaps through the use of a service?
And are there any other projects that encountered the use of CPMAddPackage and found a (non-tedious) solution? Thanks!

Here is the exact error that occurs as of now.

This exact error occurred in an earlier version, but I fixed it by patching in an older CMakeLists and bundling in a package that CPMAddPackage was supposed to add.

Can you explain what you mean? Usually “online” means “on remote server” which is exactly what build opensuse.org is.

By “online” I mean with access to the Internet. So that CPM can download the packages it needs.

I don’t have a solution to your compiler issue other than the one you mentioned for your earlier version, but if you don’t want to bother with it:
This game is also available as flatpak: Sonic Robo Blast 2 | Flathub

build.opensuse.org does not allow access to Internet. This is intentional. All dependencies must be provided either by some repository or included in your package.

Just copy CPM.cmake where your software expects it

  message(STATUS "Downloading CPM.cmake to ${CPM_DOWNLOAD_LOCATION}")

Or simply overwrite cmake/CPM.cmake stub with the actual CPM.cmake.

That’s the issue.
That means I have to patch in every CPM package included in CMakeLists.
Which wouldn’t be a problem, had the devs not been adding more CPM packages lately.
I thought this could be solved through something like a service, because OBS doesn’t allow Internet access (for obvious reasons).

I also tried patching in CPM, but it’s actually the tool used to download packages from the Internet.

You can use a service to download external sources. But that is not different to providing the same sources as part of your package. You still need to tell your software to use available content and skip attempt to download it during build.

Why not using srb2 from games >>Repo?

I’m the one who pushes updates to that repo.
Before that, the package was abandoned for 2 years.

This wouldn’t be a problem, but the game forbids online multiplayer for old versions. Hence why I am trying to update it again.

ok, I do not know.

Partially solved this by patching out bits and pieces of code again.
Fortunately, they were related to testing, so they weren’t crucial for the game.

A new issue arose, however.