[CMake] Question about Windows support.

Sylvain Benner benner at virtools.com
Mon Jun 5 11:29:25 EDT 2006


> What I need is a way to add in a specific attribute in the XML project 
> (namely UsingPrecompiledHeaders = X). This will tell the ide what to do.

To write to the XML files additionnal info that it is not supported by CMake, you must write your own generator. Or extend the current generator (or even add the feature to CMake on the CVS, I can't do it because our solution relies on too much other things which are specific on what we want).

I guess you don't need to add properties to each file in your case. You just need to write the info only once per Configuration element in the XML (Configuration element nested in the Configurations element at the beginning of the file).
Just write to the XML:
    UsePrecompiledHeader="3"        (0: not use a pch   1: create the pch    3: use the pch) 
    PrecompiledHeaderFile="your_pch"
All the source files will inherit this info.
You can do it in:
cmLocalVisualStudio7Generator::WriteConfiguration (since everything is declared private I suggest you to do so)
If you plan to add your own generator you must registrate it in cmake::AddDefaultGenerator()

I hope it will help you a bit.

Sylvain


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20060605/f1bc53e4/attachment.html


More information about the CMake mailing list