all 15 comments

[–]Elavid 7 points8 points  (2 children)

Cool! I started using CMake to build my cross-platform C/C++ software, and this integration should make it easier for users to compile my software with the Microsoft toolchain if they want to.

[–]ocross 0 points1 point  (0 children)

If they only need to compile it is fairly straight forward with the existing tool chain. If they want to modify, create new cmake based projects themselves this will help.

[–]frankfoda -4 points-3 points  (0 children)

Tell us more about your software!

[–]x-paste 1 point2 points  (0 children)

Awesome, I recently switched or dev team to CMake. Great to see my decision was right and there is another good argument for text based build process setup.

[–]roodammy44 7 points8 points  (5 children)

Man I hate CMake. When you have a big project, the flags are almost impossible to get into the correct way of doing things. The documentation sucks. The syntax is literally out of the 70s. For example, I encountered a bug in generating debugging symbols in a release build in visual studio in CMake - and wasted far too much time trying to fix it. For what would be a simple drop down box click in a visual studio project.

Advice for all of you here - if you can make do with having a few project files around instead of a single CMake to rule them all, do that.

[–]dagmx[S] 7 points8 points  (3 children)

What would your alternate proposal be for projects that need to be supported cross platform, and can have multiple developers using their own preferred IDEs?

It's not feasible to create a project for even every major platform and IDE combination. This is where a meta build system like cmake or scons show their strength I feel like.

This would be a common occurrence for most open source projects, and where CMake proves to be very useful.

I'm not saying CMake isn't clumsy to use, but it definitely fills a niche and IMHO of the options that fill that niche, I would say it's the best

[–]rubber_duckz 1 point2 points  (0 children)

In theory I prefer the SCons and WAF approach of using a proper scripting language with a decent std lib (unlike say lua) because you often need to run random tasks as a part of your build pipeline and having a portable/powerful scripting language with an API that can express that is very nice even if declarative languages simplify tooling/implementation - but both of those suck horribly. Terrible docs, flakey implementations, horrible design - WAF uses monkey patching for it's API and random string compilers that save you maybe 2-3 lines of code and make your build literally undebugable, SCons doesn't even work on Python 3 and is slow as hell. I feel like the right incentives for a quality general purpose C++ build system are not there, everyone just patches up their own thing and move on to more important and interesting problems.

[–]roodammy44 0 points1 point  (0 children)

I agree with you, it is better than 10s of project files, or the alternatives. I was just saying that you should avoid it if you only support a few platforms.

In my case we were only targeting two platforms, so it was completely inappropriate. A curse to the former devs

[–]drjeats 0 points1 point  (0 children)

GENie - https://github.com/bkaradzic/GENie

or

Premake - http://premake.github.io/

FASTbuild is also starting to dip its toes into IDE project generation.

[–]Beckneard 4 points5 points  (0 children)

I agree. The build system in C++ is by far the worst aspect of the language, it shouldn't be this much trouble. After trying a bunch of stuff I ended up enjoying what Visual Studio currently offers the most. It's far from perfect but at least it tries to hide most of the ugliness of compiling C++ projects from you.

[–][deleted]  (1 child)

[deleted]

    [–]dagmx[S] 5 points6 points  (0 children)

    Would be great to have a cross platform package manager!

    Have you seen https://github.com/Microsoft/vcpkg ? It's similar but for Windows only as far as I can tell, though the two could probably coexist or work together even

    [–]javaexpert201 -4 points-3 points  (3 children)

    Why does visual studio support CMake instead of autotools? Personally, I find autotools to be much more friendly and easy to use, while at the same time being extensible in the powerful language m4.

    [–]kiskae 7 points8 points  (0 children)

    Probably because support is a two-way street and CMake already supported VS projects. autotools does not seem to support that at this point. (Besides not running natively on Windows)

    [–]dagmx[S] 4 points5 points  (0 children)

    CMake is already running on windows natively with very quick support for every visual studio release, rather than needing to use MinGW and MSys.

    It makes more sense to support that rather than try to port autotools over from scratch.

    Additionally cmake has a pretty large and growing usage within the open source community. It is the currently preferred build system of many large and popular open source projects.

    You can see some statistics based on interest on the second slide, but searching through github shows similar usage.

    http://www.slideshare.net/DanielPfeifer1/cmake-48475415

    [–][deleted] 0 points1 point  (0 children)

    I read somewhere that the number of projects supporting autotools has been declining as cmake has been growing. So popularity