[CMake] Creating one Visual Studio solution for many configurations and platforms

David Cole david.cole at kitware.com
Fri Jun 5 13:13:50 EDT 2009


You might want to open an issue that is a feature request that asks for
exactly what you think you want....
There are several already open that talk about / have patches for adding
support for WinCE and Symbian via adding CMake generators.

At least these 3 (and probably more) already touch on the topic:
http://public.kitware.com/Bug/view.php?id=8486
http://public.kitware.com/Bug/view.php?id=8102
http://public.kitware.com/Bug/view.php?id=7919

Unfortunately, some of these take the approach of adding more and more CMake
generators rather than simply using the existing generators and adding
platforms. Granted, there are several things to consider in a re-design that
would allow extending to platform-organized sln/vcproj files... but I think
it would be better in the long run than simply adding new CMake generators
every time somebody wants a new architecture in a Visual Studio project.

The main issue is TRY_COMPILE results. They will be different for different
architectures. Of course, strictly speaking, you could construct try_compile
calls that give you one result in a Debug build and another in a Release
build, right now. (Different build time configs may results in different
results...) So.... really try_compile needs to be avoided or somehow account
for different configs and platforms for a project to work as expected after
being configured by CMake. (Iterating over all generated configs/platforms
and storing separate results keyed by config and platform would be one
approach...)

Looking forward to more discussion.....

David


On Fri, Jun 5, 2009 at 12:41 PM, Tyler Roscoe <tyler at cryptio.net> wrote:

> First, the thread I created about this question on Monday:
> http://www.cmake.org/pipermail/cmake/2009-June/029805.html
>
> On Fri, Jun 05, 2009 at 08:57:34AM -0400, David Cole wrote:
> > It is not possible with present CMake, although, in my mind it would be a
> > reasonable feature request for CMake's Visual Studio generator to support
> > multiple architecture solution/project files. If the native build tool
> > supports a given feature, then CMake might reasonably be expected to take
> > advantage of that feature if there is enough demand for it within the
> CMake
> > community.
> > Visual Studio developers are used to having multiple configurations and
> > multiple architectures all build-able from within a single solution file.
>
> I agree with all this, particularly about what VS devs are accustomed to
> seeing. I haven't even really rolled out our CMake system yet and devs
> are already complaining about the win32/x64 situation :).
>
> David, should I open an issue in the tracker?
>
> tyler
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090605/aabd4009/attachment-0001.htm>


More information about the CMake mailing list