View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0016003CMakeCMakepublic2016-03-02 14:062016-06-10 14:31
ReporterDmitry Sokolov 
Assigned ToKitware Robot 
PrioritynormalSeverityblockReproducibilityhave not tried
StatusclosedResolutionmoved 
Platformamd64OSWindowsOS Version10.0.10586.29
Product VersionCMake 3.4.1 
Target VersionFixed in Version 
Summary0016003: "Visual Studio" generators produces wrong settings for .idl files (regression).
DescriptionCMakeLists.txt:

add_executable(app main.cpp file.idl)
set_source_files_properties(file.idl PROPERTIES COMPILE_FLAGS "/nologo /char signed /env win32 /tlb \"file.tlb\" /I \"../include\" /out \"${PROJECT_BINARY_DIR}/include\" /h \"file.h\" /dlldata \"dlldata.c\" /iid \"file_i.c\" ")


Files main.cpp, file.idl are empty.

Generating:

cmake.exe -G "Visual Studio 12 2013" path\to\CMakeLists.txt

CMake v3.4.x, v3.5.x will produce a .vcxproj:

  <ItemGroup>
    <Midl Include="path\to\file.idl" />
    <ClCompile Include="path\to\main.cpp" />
  </ItemGroup>

while CMake v3.2.1 will produce

  <ItemGroup>
    <Midl Include="path\to\file.idl">
      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
      <DefaultCharType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Signed</DefaultCharType>
      <DllDataFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">dlldata.c</DllDataFileName>
      <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">file.h</HeaderFileName>
      <InterfaceIdentifierFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">file_i.c</InterfaceIdentifierFileName>
      <OutputDirectory Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">include</OutputDirectory>
      <SuppressStartupBanner Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</SuppressStartupBanner>
      <TargetEnvironment Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Win32</TargetEnvironment>
      <TypeLibraryName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">file.tlb</TypeLibraryName>
...
    </Midl>
    <ClCompile Include="path\to\main.cpp" />
  </ItemGroup>
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0040639)
Brad King (manager)
2016-03-07 11:32

Please 'git bisect' history to see when this was regressed.

Any fix to this should also include an update to Tests/VSMidl to cover it with a test.
(0042955)
Kitware Robot (administrator)
2016-06-10 14:29

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2016-03-02 14:06 Dmitry Sokolov New Issue
2016-03-07 11:32 Brad King Note Added: 0040639
2016-06-10 14:29 Kitware Robot Note Added: 0042955
2016-06-10 14:29 Kitware Robot Status new => resolved
2016-06-10 14:29 Kitware Robot Resolution open => moved
2016-06-10 14:29 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team