It is happening when I do add_subdirectory(JUCE) in my CMakeLists.txt file (I checkout JUCE as a git submodule in my code repositories).
The output is empty, so there is no guidance on what might be wrong. If I downgrade to JUCE 8.0.1 the error goes away. I am trying this with my main app and a very simple/minimal example based on your CMake example (which hasn’t changed in a while), and they behave the same, so it seems like a new issue in JUCE 8.0.2.
Let me know if there is something I can do to help debug. I have no idea what might be wrong. If needed I can put the minimal example on github.
I think this is resolved, but there’s probably at least one missing error message that could be improved.
For context: I’m still not familiar/comfortable with much of the C++ build toolchain. I make simple cmake projects, use add_subdirectory(JUCE) with JUCE as a git submodule, and do the standard cmake import in Visual Studio and/or CLion to open it in an IDE. I stick to all the default settings, including using the compiler installed with Visual Studio (for CLion too) and ninja for the generator. I think I’m on the latest version of everything. The only change I might make in the IDE is to run AudioPluginHost when building the VST3.
With Visual Studio, some combination of deleting the .vs and out folders, restarting the IDEA, and using the “delete cache and reconfigure” feature seems to have resolved the error after upgrading from 8.0.1 to 8.0.2. This is with a fresh cmake project based on the official cmake audio plugin example.
But juceaide kept failing in my main plugin project. After comparing things with the basic example, I pintpointed my issue: I ignored the comments in CMakeLists.txt and made my PLUGIN_CODE be all caps. It says it must be exactly 1 capital letter and 3 lower case letters. I changed it and it fixes the juceaide error.
So it appears a valid PLUGIN_CODE may be getting enforced in JUCE 8.0.2 and there is not an appropriate error message? I tried downgrading back to 8.0.1 and I can’t reproduce any of this behavior there.
CLion got really hung up on the juceaide error even after I fixed PLUGIN_CODE. I was doing things like: invalidate the cmake cache, the file system cache, restart the IDE, delete the idea setting folder. I am pretty sure I did everything reasonable, but I couldn’t resolve the error a few times. I suspect jumping between Visual Studio and CLion while investigating really confused CLion. I eventually just did a fresh checkout of my code respository and only opened it in CLion, and it seems ok now. So I guess something was lingering on the file system causing problems? Even after a fresh checkout, I still hit a juceaide error on first build, but it seemed inconsistent. If that happened after a fresh checkout, deleting the cmake-build-debug folder and reloading the cmake config fixes it. So I was able to get JUCE 8.0.2 working with CLion on Windows.