[CMake] on cmake supporting one arch per project (from CMake IR)
Scott Aron Bloom
scott at towel42.com
Tue Aug 4 22:04:04 EDT 2015
-----Original Message-----
From: Raymond Wan [mailto:rwan.work at gmail.com]
Sent: Tuesday, August 4, 2015 6:53 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 8:23 AM, Scott Aron Bloom <scott at towel42.com> wrote:
> 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.
Hmmmm, well, this last point raises the question of whether the support you're asking is best served by the IDE developers by "wrapping around" CMake (or some other build tool).
> 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.
...
> All we are asking for (and we do realize its not trivial to implement) is to generate both multiple configuration and targets.
It is a depressing view and not quite what I was suggesting. It's more like "was this way" is working for some people already.
The new feature that you and some others are asking for seems to be a lot of work (NB: I'm not a CMake developer). And it *feels* like that this is something that either the build tool could support or maybe even the IDE. As the IDE here is closed source and doesn't permit changes, then changing the more open build tool is the next logical step. But if effort is put into making some CMake 4.0 and suddenly VS's IDE puts what you desire out within the IDE, then there will be no users. Or, not enough to justify the effort...
Again, I'm not a Windows developer, but would this statement be correct? Does VS or Xcode permit "plugins" to be created by the community so that maybe one could be made to "wrap around" CMake?
Ray
=====
I know VS absolutely allows for plugins, but I do not believe it would be appropriate, to be honest, I don’t think you fully understand the problem being put forth.
For VS, the project it loads, has no idea it came from CMake, or from any other build system (qmake etc). For VS at the top level it’s a sln (solution) file, and each library or executable is a project file (vcproj or vcxproj for newer versions).
CMake generates these files, and the IDE loads the SLN file in first, which points to which project files to load.
For every file, its possible (not typical) to have different options for both configuration (debug, release, relwithdebug etc) as well as target technology (win32, win64 etc). Typically files, get their options from the project settings, and each project has settings for config and target. However, they are in the same file per project. It really wouldn’t make sense to have the IDE generating its own project files from CMakeList.txt files, though it is theoretically possible. And in reality, I have been a VS (as well as makefile developer) for over 25 years, since before it was Visual Studio, their typical flow, is to use the IDE to create the SLN and Project files using their methods, again it could be a plugin, however, to do so, you would have to write a CMake plugin, which could parse a CMake input file set, and create a complete solution. To me it seems like overkill, since the pluging would have to be in a VS plugin compatible language (at least at the interface). Again possible, but its never going to come from MS (or apple for XCode)
I do understand the current cmake works for many users, however, right now for XCode and VS, its missing a major aspect of the development process. And for both of them, PART of the need is already serviced. I can tell you, I would never have pushed my company (and it was my decision) to use CMake, if it ONLY supported 1 configuration per solution file (debug vs release). That would have been a major step back from QMake.
Scott
More information about the CMake
mailing list