[CMake] C# and cmake ?

Yuri Timenkov yuri at timenkov.ru
Wed Aug 22 09:55:55 EDT 2012


Generator expressions are special placeholders $<> used in custom commands
and targets. If external project weren't of "utility" type in CMake (e.g.
executable) it would be possible to associate imported location with it and
use in other custom commands and targets as any other target. This allows
CMake to automatically substitute configuration and handle dependencies
where necessary.

For example if you have code generator or test runner written in C#. Now
it's still possible but you have to use CMAKE_CFG_INTDIR.

On Wed, Aug 22, 2012 at 4:08 PM, Gerhard den Hollander <
gdenhollander at fugro-jason.com> wrote:

> * Yuri Timenkov <yuri at timenkov.ru> (Wed, Aug 22, 2012 at 01:20:37PM +0200)
> > It's better to use include_external_msproject with C# projects. After
> fixing bug http://public.kitware.com/Bug/view.php?id=13120 it's possible
> to use:
> >
> > include_external_msproject(Configurator
> ${CMAKE_SOURCE_DIR}/MyCSProject.csproj
> >     TYPE FAE04EC0-301F-11D3-BF4B-00C04F79EFBC
> >     PLATFORM "Any CPU"
> >     )
>
>
> According to the 2.8.9 changelog, this bugfix is part of 2.8.9.
>
>
> >
> > Additionally you can use configure_file to create file in $(SolutionDir)
> to pass information (like paths, configuration options, etc.) to msbuild
> and VS IDE.
>
> > The only drawback is that CMake sees these project as utility projects,
> so you can't use them in generator expressions. However you can link to
> them by adding dependencies.
>
> Im not sure what you mean with the above. What are generator
> expressions ?
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120822/35a85e3f/attachment.htm>


More information about the CMake mailing list