MantisBT - CMake
View Issue Details
0011311CMakeCMakepublic2010-10-13 12:492011-05-02 14:45
Julian Lim 
David Cole 
normalmajoralways
closedfixed 
CMake-2-8 
CMake 2.8.4CMake 2.8.4 
0011311: Visual Studio 2008 MIDL and cmake 2.8.2
I'm submitting a patch for 2.8.2 cmake which consist of a patch (described in issue 0008165) that is designed cmake 2.8 AND 3 more items that we worked on.

We are working on Visual Studio 2008 COM project which has IDL files and need MIDL to generate the .TLB and header and source files, and we faced with 2 major issues.

(1) Looking at 2.8.2 code, the patch from 0008165 hasn’t been applied. After we manually apply it, got us a step forward and now we faced with issue 0000002.

http://www.vtk.org/Bug/view.php?id=8165 [^]

1>------ Build started: Project: vbabc, Configuration: Release Win32 ------
1>Creating Type Library...
1>midl : command line warning MIDL1009 : unknown argument ignored "..\..\..\..\source\libvbabc\vbabc.idl"
1>Processing Release\""
1>Release""
1>c1 : fatal error C1083: Cannot open source file: 'Release""': Invalid argument
1>midl : command line error MIDL1003 : error returned by the C preprocessor (2)
1>Build log was saved at "file://c:\source\build\msvc\vc\libvbabc\vbabc.dir\Release\BuildLog.htm" [^]
1>vbabc - 2 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========

(2) After issue #1 resolved, we could finally MIDL tools ran against IDL files. There were 2 issues we face when issue #1 is resolved.

a. The .TLB files are generated inside build directory (example, vbabc.dir/Release) but Visual Studio is still looking for it in the CMAKE Source directory. Yes, we do want these files to be generated in vbabc.dir/Release which is the object directory because this will enable us to build from multiple processes and do not interfere with each build.
b. The generated headers is not in any Include path that when our source include it an error occurs.
c. For Linker, DebugInformation is YES for Release version.

The patch I'm submitting face all these issues in 2.8.2.

-Julian Lim
Tradebot Systems

No tags attached.
related to 0008165closed David Cole vs2005 midl chokes on CMAKE_INTDIR 
related to 0010687closed David Cole VC 2010 generator ignores .idl Files and doesn't produce .tlb file 
patch cmLocalVisualStudio7Generator.cxx.2.8.2.patch (4,092) 2010-10-13 12:49
https://public.kitware.com/Bug/file/3448/cmLocalVisualStudio7Generator.cxx.2.8.2.patch
Issue History
2010-10-13 12:49Julian LimNew Issue
2010-10-13 12:49Julian LimFile Added: cmLocalVisualStudio7Generator.cxx.2.8.2.patch
2010-10-13 12:53Julian LimNote Added: 0022490
2010-10-13 13:08Bill HoffmanStatusnew => assigned
2010-10-13 13:08Bill HoffmanAssigned To => David Cole
2010-11-12 14:47Robert LenhardtNote Added: 0023227
2010-11-15 08:09David ColeRelationship addedrelated to 0008165
2010-11-15 08:09David ColeTarget Version => CMake 2.8.4
2010-12-15 09:16David ColeRelationship addedrelated to 0010687
2011-01-05 11:08David ColeNote Added: 0024422
2011-01-05 11:08David ColeStatusassigned => resolved
2011-01-05 11:08David ColeFixed in Version => CMake 2.8.4
2011-01-05 11:08David ColeResolutionopen => fixed
2011-05-02 14:45David ColeNote Added: 0026309
2011-05-02 14:45David ColeStatusresolved => closed

Notes
(0022490)
Julian Lim   
2010-10-13 12:53   
The last sentence should read: The patch I'm submitting FIX all these issues in 2.8.2
(0023227)
Robert Lenhardt   
2010-11-12 14:47   
Just a tip regarding your second problem:

You can add the output directory of the generated sources to the include dirs in your project CmakeLists.txt like this:

include_directories("${vbabc_BINARY_DIR}/\$(IntDir)")

${vbabc_BINARY_DIR} holds the directory where you .vcproj files are generated and $(IntDir) is a visual studio macro which expands to the path containing the generated files.
(0024422)
David Cole   
2011-01-05 11:08   
Fixed by this commit, just pushed to CMake 'next':
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=13caaa3eb74a11dbf067409ea129321718d34dfe [^]

I expect this will make it into the upcoming CMake 2.8.4 release. I will update this and related issues with another note if that expectation turns out to be too optimistic... :-)
(0026309)
David Cole   
2011-05-02 14:45   
Closing resolved issues that have not been updated in more than 3 months.