[cmake-developers] [CMake 0013992]: Source files with same name not building for VS 2010

Mantis Bug Tracker mantis at public.kitware.com
Fri Mar 8 17:14:44 EST 2013


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=13992 
====================================================================== 
Reported By:                toby_toby_toby
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   13992
Category:                   (No Category)
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2013-03-08 17:14 EST
Last Modified:              2013-03-08 17:14 EST
====================================================================== 
Summary:                    Source files with same name not building for VS 2010
Description: 
Project has 2 files with the same name, but different directories.

VS2010 project unbuildable in that case.


Steps to Reproduce: 
1. configure and generate attached archive for VS2010


2. try build source.cpp - you should get this:
    badmake\subdirectory\source.cpp : fatal error C1083: Cannot open compiler
generated file: 'project.dir\Debug\/subdirectory/source.cpp.obj': No such file
or directory



3. now open generated vsproj in text editor and remove <ObjectFileName> from
this:

<ItemGroup>
    <ClCompile Include="..\badmake\source.cpp" >
      <ObjectFileName>$(IntDir)/source.cpp.obj</ObjectFileName>
    </ClCompile>
    <ClCompile Include="..\badmake\subdirectory\source.cpp" >
      <ObjectFileName>$(IntDir)/subdirectory/source.cpp.obj</ObjectFileName>
    </ClCompile>
  </ItemGroup>

and you will get this

    <ClCompile Include="..\badmake\source.cpp" />
    <ClCompile Include="..\badmake\subdirectory\source.cpp" />




4. reload project is VS, it's buildable now!
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2013-03-08 17:14 toby_toby_toby New Issue                                    
2013-03-08 17:14 toby_toby_toby File Added: badmake.zip                      
======================================================================




More information about the cmake-developers mailing list