[CMake] on cmake supporting one arch per project (from CMake IR)

Scott Aron Bloom scott at towel42.com
Tue Aug 4 20:23:12 EDT 2015



-----Original Message-----
From: Raymond Wan [mailto:rwan.work at gmail.com] 
Sent: Tuesday, August 4, 2015 5:14 PM
To: Scott Aron Bloom
Cc: cmake at cmake.org
Subject: Re: [CMake] on cmake supporting one arch per project (from CMake IR)

On Wed, Aug 5, 2015 at 7:10 AM, Scott Aron Bloom <scott at towel42.com> wrote:
> ===================
> IMO, this is one of the biggest shortcomings of CMake.  I understand the heritage of the CMake world being "make file" based..  I really do.. And I love having a true "out of source" make file generator for when I am doing my Linux based development.  And I don’t mind having a src tree, a build, a build.rel, build.32 and a build.rel.32 etc etc for every possible configuration I need.
>
> However, when on windows, in VS, having at a minimum of two build directories (64 vs 32) is a major downside of CMake.
>
> I understand if its not in the 3.X timeframe, as I would expect it to be a major change.. But IMO, being able to have architecture as well as build types in one VS project (as well as xcode) would be a major improvement for the community.
> Scott


I don't do any Windows development, so I didn't realize this.  But to change CMake (even 4.x) to accommodate this seems strange to me.  I mean, for the Linux/Unix developers out there, it "works".  While there was an earlier argument that the vast majority of users are Windows-based, if we consider just developers, then I don't think the difference is that large.

In any case, as alluded to in the other thread, why not develop a Windows-way of creating CMakeLists.txt -- i.e., create another project (WMake or WCMake :-P ) that generates partially compatible CMakeLists.txt ...  Or maybe VS should be including this as a feature in their IDE, instead?

Alternatively, perhaps we should just admit that Windows and Linux-based development are different.  And CMake supports "cross-platform development (including Windows) for Linux-based developers".  Not suggesting it should turn away Windows-based developers, but just admit that it was created with a Linux/Unix mindset (for better or worse) and can't satisfy all development paradigms...

Ray
=================
I understand.. However, my point are these.

First, its no longer just windows, its windows and mac using XCode.  
Second, VS and XCode ALREADY support this feature in their IDE.  In NON CMake created project systems, I can have in 1 project, Arm, Android, Windows Phone, x86 and x64.  Where some applications in the project get built, others don’t, and every library can get built with different options.  This isn’t a CMakeLists.txt issue, it’s a Solution "output" from Cmake issue.
Third, its on linux as well, more and more IDEs support multiple targets and platforms for a given project.  Eclipse, and I believe Qt Creator (though I could be wrong) to name two popular ones.
Fourth, just because it "was this way" doesn’t mean "it should always be this way", that’s a pretty depressing point of view to take on.

And last, CMake already does it "kinda" for configurations.  For VS and for XCode, it will generate 4 different configurations (or as many are as available in  CMAKE_CONFIGURATION_TYPES), however, it only does it for one platform, Win32 or Win64 depending on the generator selected.

All we are asking for (and we do realize its not trivial to implement) is to generate both multiple configuration and targets.

Scott





More information about the CMake mailing list