Is there a way to disable recompiling BinaryData every time they change?

Under Projucer, if you changed the BinaryData files, they changes didn’t get reflected in C++ BinaryData.cpp until you ran Projucer again.

Under CMake, as soon as you change them, they cause the entire project to be recompiled. Is there any way to disable this behaviour? I’d like it to only happen when cmake is run again.

The reason is it really slows down the recompile / test workflow.

For our debug builds, we load binary data files directly from disk, and only use the BinaryData in release. This allows us to edit files and have them hot reload.

If you don’t use the binary data in debug at all, then you can link to it only in release, which should prevent it from being recompiled when you do a debug build

What I do is create a dynamic list of all the binary datas in one .cpp file, store it in a singleton and then access it dynamically from anywhere without any compilation unit directly including BinaryData.h. This makes changes much faster because other than that one CPP file that includes BinaryData, nothing else needs to recompile.

You can see an example here: