How to use Google Test with JUCE projects?

Can anyone give me some help using Google Test in my JUCE project? I’m on Windows using Visual Studio 2019. I can’t really tell what I’ll need to do in Projucer. Surely someone’s using gtest in their JUCE project?

Are you doing audio plugins?
In this case I would suggest to take a look at this patch for the Projucer. We added a GoogleTestConsoleApp build target that oyu can enable just like any other plugin format.

If you’re doing standalone apps: I guess the most simple way would be to use a separate Projucer project.

I’m planning a plugin. I’ll take a look at this thanks!

You might have an easier time using CMake instead of the projucer if you are using JUCE 6. Much easier to handle multiple targets.

1 Like

Yes, absolutely!

We did this modification to JUCE5 because we had our whole CI system already setup around the Projucer workflow. At the time we did this, a CMake workflow was already available but switching to CMake would have meant a huge change to everything so we decided against it.