[CMake] Visual Studio: Add file to project without compiling it

Matthias Riechmann riechmann at ira.uka.de
Mon Oct 20 07:46:01 EDT 2008


Hello,

I'd like to make CMake including a file in way so that it is visible in 
a generated visual studio project and can be edited in this way, but is 
not processed by the compiler.

The reason I need this is as followed: I have some CORBA IDL files that 
I'd like to process using a custom macro calling add_custom_command to 
run the idl compiler. So far it works quite well, the file is processed 
on build, but since I don't specify the IDL file as a source file in the 
add_executable command it doesn't appear in visual studio. When adding 
it to the source files Microsoft's MIDL compiler tries to work on this 
file as well, which is not what I intended to do.

So, is it in any way possible to just show a custom file in Visual Studio?


Matthias



-- 
Dipl.-Inform. Matthias Riechmann
Institut für Prozessrechentechnik, Automation und Robotik
Medizin-Gruppe
Universität Karlsruhe (TH)
Gebäude 40.28, Zimmer 103
Engler-Bunte-Ring 8
76131 Karlsruhe

Fon: +49 (721) 608-4049
Fax: +49 (721) 608-7141

Web: http://wwwipr.ira.uka.de/~richmann
-------------- next part --------------
A non-text attachment was scrubbed...
Name: riechmann.vcf
Type: text/x-vcard
Size: 493 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20081020/4edbb82b/attachment.vcf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3319 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://www.cmake.org/pipermail/cmake/attachments/20081020/4edbb82b/attachment.bin>


More information about the CMake mailing list