New user trialing the software, trying to figure a few things out
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!
Please sign in to leave a comment.
Hello!
Yes.
Feel free to comment or upvote CPP-27803. See https://intellij-support.jetbrains.com/hc/en-us/articles/207241135-How-to-follow-YouTrack-issues-and-receive-notifications if you are not familiar with YouTrack.
Yes, it's possible to share CMake profiles - https://www.jetbrains.com/help/clion/cmake-profile.html#sharing-profiles.
Also it's possible to disable profiles if unsuitable profiles somehow end up on the host - https://www.jetbrains.com/help/clion/cmake-profile.html#disabling-profiles.
I see that you created a separate post about it. I passed it on to my colleagues from the IntelliJ IDEA platform.
CLion delegates the build process to CMake. So it depends on whether you can achieve everything you need using CMake.
Just following up on this.
I decided against continuing with CLion for the following reasons:
- the search/find function is too cumbersome
- I found myself constantly fighting with the editor vs what I am used to with XCode. I also find by default it was too over-annotated/colourful/trying to be too clever and this was making the whole thing a bit sluggish. For comparison, I didn't get the same feeling when using VSCode which, while not without its own flaws, seems a better match for my editing needs as it's faster a bit less “in your face”.
- lack of option to clean + build + install all the targets in one shot
- lack of remote support for a Windows host at the current time
- CMakePresets seemed to be ignoring the “displayName” field.
- I noticed the whole app (on macOS anyway) would freeze occasionally for a few moments
I reported some of the above, but in all honesty, as a trial user I don't really want to just spend my time logging bugs/feature requests. That suggests the software isn't for me.
I will check back again in a year or two and see where we're at; I can see it's been developed with passion but right now it's just not for me.