[cmake-developers] [CMake 0016003]: "Visual Studio" generators produces wrong settings for .idl files (regression).
Mantis Bug Tracker
mantis at public.kitware.com
Wed Mar 2 14:06:28 EST 2016
The following issue has been SUBMITTED.
======================================================================
https://public.kitware.com/Bug/view.php?id=16003
======================================================================
Reported By: Dmitry Sokolov
Assigned To:
======================================================================
Project: CMake
Issue ID: 16003
Category: CMake
Reproducibility: have not tried
Severity: block
Priority: normal
Status: new
======================================================================
Date Submitted: 2016-03-02 14:06 EST
Last Modified: 2016-03-02 14:06 EST
======================================================================
Summary: "Visual Studio" generators produces wrong settings
for .idl files (regression).
Description:
CMakeLists.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>
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2016-03-02 14:06 Dmitry Sokolov New Issue
======================================================================
More information about the cmake-developers
mailing list