[cmake-developers] [CMake 0011536]: Can't use assembler files with Visual Studio 10 generator

Mantis Bug Tracker mantis at public.kitware.com
Mon Aug 20 11:51:14 EDT 2012


The following issue is now in status NEW (again) 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=11536 
====================================================================== 
Reported By:                Nikita Borodikhin
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   11536
Category:                   CMake
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
Target Version:             CMake 2.8.10
====================================================================== 
Date Submitted:             2010-11-29 20:33 EST
Last Modified:              2012-08-20 11:51 EDT
====================================================================== 
Summary:                    Can't use assembler files with Visual Studio 10
generator
Description: 
With Visual Studio 2010 generator I can't use assembler files. If I try to use
them as supposed to:
* enable_lanuages(ASM_MASM)
* add_executable(... a.asm)
then generator will add a.asm to a project as custom-command file but without
any command associated with it (see bug#0008170)

If I try to use custom command I used for Visual Studio 8 and 9:
add_cusotom_command(
  DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/a.cxx
  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/a.obj
  COMMAND ml /c /coff /Zi
    ${CMAKE_CURRENT_SOURCE_DIR}/a.cxx
    /Fo ${CMAKE_CURRENT_BINARY_DIR}/a.obj
    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
then Visual Studio 10 fails to load generated project reporting:
  error: The item "a.obj" already exists under the filter ""
The code responsible for placing object files under unnamed filter is
cmVisualStudio10TargetGenerator::WriteObjSources. It doesn't check whether
object files came from a custom command.
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0011464 Cannot build asm file on msvs2010
related to          0009905 Support for .asm files in the Visual St...
related to          0008170 Visual Studio 9 generator does not outp...
has duplicate       0012465 masm & msvc
related to          0012524 CMake 2.8.6 Configure Error identifying...
====================================================================== 

---------------------------------------------------------------------- 
 (0025966) Bill Hoffman (manager) - 2011-03-30 09:47
 http://public.kitware.com/Bug/view.php?id=11536#c25966 
---------------------------------------------------------------------- 
So, it fails if you have a.cxx and a.obj in the same target.  That is sort of
hard to fix.  If you had a_c.cxx or a_obj.obj then it would work right? 

---------------------------------------------------------------------- 
 (0026579) Alex Neundorf (developer) - 2011-05-25 16:08
 http://public.kitware.com/Bug/view.php?id=11536#c26579 
---------------------------------------------------------------------- 
I don't feel competent for adding this to the VS generators, so I'm un-assigning
this one.
 

---------------------------------------------------------------------- 
 (0026590) David Cole (manager) - 2011-05-25 16:54
 http://public.kitware.com/Bug/view.php?id=11536#c26590 
---------------------------------------------------------------------- 
Not for 2.8.5 - postponing until a future release 

---------------------------------------------------------------------- 
 (0027998) Amine Khaldi (reporter) - 2011-12-17 03:40
 http://public.kitware.com/Bug/view.php?id=11536#c27998 
---------------------------------------------------------------------- 
Alex, regarding your reply in http://public.kitware.com/Bug/view.php?id=12465
about not having a Windows machine available, we (ReactOS) can arrange access to
one of our machines through RDP, and I'll assist you with anything you'll need
that machine to have, in order to tackle the CMake Windows/VS issues. Let me
know if you're interested.

Amine

 

---------------------------------------------------------------------- 
 (0029234) David Cole (manager) - 2012-04-19 08:45
 http://public.kitware.com/Bug/view.php?id=11536#c29234 
---------------------------------------------------------------------- 
Unset target version, taking off roadmap.

Will put back on roadmap if somebody volunteers to take this issue on...
 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-11-29 20:33 Nikita BorodikhinNew Issue                                    
2010-12-15 12:22 David Cole     Relationship added       related to 0011464  
2011-01-17 14:22 David Cole     Assigned To               => Alex Neundorf   
2011-01-17 14:22 David Cole     Status                   new => assigned     
2011-03-10 15:05 Alex Neundorf  Relationship added       related to 0009905  
2011-03-10 15:05 Alex Neundorf  Relationship added       related to 0008170  
2011-03-30 09:47 Bill Hoffman   Note Added: 0025966                          
2011-04-14 14:33 David Cole     Target Version            => CMake 2.8.5     
2011-05-25 16:08 Alex Neundorf  Note Added: 0026579                          
2011-05-25 16:08 Alex Neundorf  Assigned To              Alex Neundorf =>    
2011-05-25 16:08 Alex Neundorf  Status                   assigned => backlog 
2011-05-25 16:54 David Cole     Note Added: 0026590                          
2011-05-25 16:54 David Cole     Target Version           CMake 2.8.5 =>      
2011-10-18 16:47 Alex Neundorf  Relationship added       related to 0012465  
2011-10-18 16:51 Alex Neundorf  Relationship added       related to 0012524  
2011-10-18 16:54 Alex Neundorf  Issue Monitored: Alex Neundorf                  
 
2011-10-21 01:01 exciton        File Added: cmake_0011536_assembler_vs10.patch  
                 
2011-10-23 07:53 Vladislav      Issue Monitored: Vladislav                    
2011-12-17 03:32 Amine Khaldi   Issue Monitored: Amine Khaldi                   

2011-12-17 03:39 Amine Khaldi   Note Added: 0027998                          
2011-12-17 03:40 Amine Khaldi   Note Edited: 0027998                         
2011-12-21 08:29 David Cole     Relationship replaced    has duplicate 0012465
2012-01-03 16:23 David Cole     Target Version            => CMake 2.8.8     
2012-04-19 08:45 David Cole     Note Added: 0029234                          
2012-04-19 08:45 David Cole     Target Version           CMake 2.8.8 =>      
2012-05-04 04:24 Daniel Maloney Issue Monitored: Daniel Maloney                 
  
2012-08-20 11:51 David Cole     Status                   backlog => new      
2012-08-20 11:51 David Cole     Target Version            => CMake 2.8.10    
======================================================================




More information about the cmake-developers mailing list