So let's say I have a CMakeLists.txt file which, depending on parameters passed in, will build for Android, iOS, macOS, tvOS or win32.
I have a bunch of build scripts which control the arch, config, whether to build with clang-tidy etc etc that get passed in. These scripts are used by my CI system.
So I have opened one of these CMakeLists.txt files in CLion on my Mac. I can see it has created a default Debug cmake profile. If I modify the CMAKE variables, and anything else I usually pass in when I build via my scripts, I can get it building successfully in CLion.
So is the correct workflow, then, to create a CMake profile for every combination of platform, arch, config?
So a linear list like this:
ios - arm64 Debug
ios- arm64 Release
macos - arm64 Debug
macos - x64 Debug
macos - arm64 Debug
macos - x64 Debug
tvos - etc
Then presumably Android, when I've figured out how to pass in the ANDROID_NDK_ROOT etc, and Windows too on a Windows host.
Or is there some higher-level way I am supposed to use to choose the platform/arch?
If the above is the correct way, that's ok, and I can see the “Build Project” builds them all which is nice. I couldn't see a way to Install all of them, that's the only thing. There seems to be only a single Install option in the menu that installs for the currently selected CMake profile. It would be nice to have “Install Project”, like we have “Build Project” and “Rebuild Project” which would run through and do them all. Or “Build and Install Project” option to do both in one, which would be even better.
I can see that if I choose the “Share” option in Edit CMake Profiles it will create a cmake.xml file which it looks like I can use on different machines though I'd have to figure out how it would work if that file contained profiles not applicable to the host (eg Windows toolchain on a Mac) and whether I can exclude/disable them according to the host.
I tried a “Find In Files…” and couldn't work out how to make it default to the find window as at the moment it brings up a rather annoying popup. I dislike popup showing search results as invariably it tries to show too much information/too long a list in a small box.
I'd like it work more like Xcode where you can change the search and it will update the list of matching files below, and then you can highlight each one and it shows it to the right. The find window seems similar to this but annoyingly it seems that if I want to change the search I have to have another popup which I then immediately close to get the results in a more usable manner. I can see there has been some feedback about this change without an apparently resolution, so do Jetbrains listen to feedback or is it one of those companies where they make changes to how things work and people get annoyed as they have to then suddenly, one day, do things differently?
I ask from the point of view of someone who has migrated away from manually updating MSVC, Xcode and Android makefiles through to using CMake and now looking for an IDE that I can use on both my main dev hosts, which are macOS and Windows.
Finally, I haven't got there yet, but can CLion be used to build bundles/exes on all the above platforms, e.g. the Apple eco system bundle format, Android APK, Windows exe? I am hoping that as I've moved everything now into CMakeLists.txt files, ie making use of all the CMAKE_XXX variables for the different platforms, bundles IDs, assets, etc, that I can just switch my application projects away from using the IDE generators (Xcode, Visual Studio) to Ninja and then actually run and debug through CLion? Or is that an unrealistic target, and I'm likely to still end up needing the native IDE for debug/running?
Apologies for what is a bit of a brain dump, hoping I can get an idea of whether CLion is the answer to my Q!