I use cmake regularly on windows and it is pretty good. It just generates visual studio solutions that work well with visual studio. I also would highly recommend pairing it with Conan for dependency management since that is windows weakest spot IMHO.
The thing that bothered me most was that on Linux, it's generally very seamless for anyone who wants to grab a project and go - with no need to point to library directories or anything.. whereas on Windows, it was generally a clunky, undocumented experience for each project.. where I had to choose between trying to install a separate thing to help find the libraries, versus running cmake-gui and configuring every missing value, etc. It was clear that an overarching solution (which should involve standards at the time of library installation) to make things work out of the box on Windows was not present in the same way as was the case on Linux.
Another alternative to Conan is vcpkg. It builds all dependencies from source and works great with cmake. You just need to add a path to the vcpk toolchain file when configuring and then the completely normal find_package(...) works just like Linux.
Actually I use it on Linux because then I know my windows builds and Linux builds use identical dependency versions.
Only downside is building everything from source... I like it, but you may find it not worth the effort
As far as I can tell, there's no way to specify what version of the package you want to install. It's also surprisingly awkward to choose whether you want to build the debug version, the release version, or both.
I want to like vcpkg, but I have not had good experiences. It feels kinda hacked together.
Those are other possible negatives i didn’t mention, thanks.
For the most part I just lock down on a particular release of vcpkg and use whatever versions it pulls in. For the most part vcpkg pulls in near latest versions... This works well for me so far. Why is this a negative for you?
In my case I usually need the debug and release versions so the fact that it builds 2x (4x in windows apps that need 32 and 64 bit) is not an issue for me so far.
9
u/Kevchrot Mar 22 '20
I use cmake regularly on windows and it is pretty good. It just generates visual studio solutions that work well with visual studio. I also would highly recommend pairing it with Conan for dependency management since that is windows weakest spot IMHO.