MantisBT - CMake
View Issue Details
0007845CMakeCMakepublic2008-10-23 08:362009-01-27 10:27
Eric NOULARD 
Bill Hoffman 
normalminoralways
closedfixed 
CMake-2-6 
 
0007845: IDL files set as "HEADER_ONLY" are compiled by midl in Visual Studio project
The HEADER_ONLY property is not honored
by the Visual Studio Generator for idl files.
If an.idl file is added to library or executable
and if
set_source_files_properties(<idlfile> PROPERTIES HEADER_ONLY TRUE)
is called.

The generated Visual Studio project is trying to compile
the idl file with MS "midl" compiler....

The problem does not occurs with Code::Blocks/MinGW on Windows
nor with any tested Linux generator.

Please find attached a project which exhibits the error.

This error was originally reported by Matthias Riechmann:
http://www.cmake.org/pipermail/cmake/2008-October/024691.html [^]
No tags attached.
zip IDLs-0.1.1-Source.zip (28,620) 2008-10-23 08:36
https://public.kitware.com/Bug/file/1798/IDLs-0.1.1-Source.zip
png vs8.png (48,094) 2008-10-27 12:37
https://public.kitware.com/Bug/file/1801/vs8.png
png
Issue History
2008-10-23 08:36Eric NOULARDNew Issue
2008-10-23 08:36Eric NOULARDFile Added: IDLs-0.1.1-Source.zip
2008-10-27 12:37Matthias RiechmannFile Added: vs8.png
2008-10-27 12:37Matthias RiechmannNote Added: 0013938
2009-01-08 16:00Bill HoffmanStatusnew => assigned
2009-01-08 16:00Bill HoffmanAssigned To => Bill Hoffman
2009-01-27 10:27Bill HoffmanNote Added: 0014683
2009-01-27 10:27Bill HoffmanStatusassigned => closed
2009-01-27 10:27Bill HoffmanResolutionopen => fixed

Notes
(0013938)
Matthias Riechmann   
2008-10-27 12:37   
It took me some time to get an account on this Matis system but thanks to Eric the bug is already reported. I added a screenshot showing Visual Studio's build options. You can see even if setting the IDL file's property PROPERTIES HEADER_ONLY to TRUE, the MIDL compiler is about to be run.
(0014683)
Bill Hoffman   
2009-01-27 10:27   
cvs commit -m "BUG: fix for 7845, idl files compile even with headerfile only on" cmLocalVisualStudio7Generator.cxx
Committer: Bill Hoffman <bill.hoffman@kitware.com>
/cvsroot/CMake/CMake/Source/cmLocalVisualStudio7Generator.cxx,v <-- cmLocalVisualStudio7Generator.cxx
new revision: 1.236; previous revision: 1.235