MantisBT - CMake
View Issue Details
0011536CMakeCMakepublic2010-11-29 20:332014-06-02 08:38
Nikita Borodikhin 
Patrick R. Gansterer 
normalmajoralways
closedfixed 
PCWindowsany
CMake 2.8.3 
CMake 2.8.12 
0011536: Can't use assembler files with Visual Studio 10 generator
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.
No tags attached.
related to 0011464closed Alex Neundorf Cannot build asm file on msvs2010 
related to 0009905closed  Support for .asm files in the Visual Studio generators 
related to 0008170closed  Visual Studio 9 generator does not output Custom Build Tool command line for assembler sources 
has duplicate 0012465closed Alex Neundorf masm & msvc 
related to 0012524closed Alex Neundorf CMake 2.8.6 Configure Error identifying assembler with VS2010 
related to 0014399closed Patrick R. Gansterer Can't use assembler files with Visual Studio 11 generator 
related to 0014710closed Patrick R. Gansterer Wrong value in VS .vcxproj project file 
patch cmake_0011536_assembler_vs10.patch (4,690) 2011-10-21 01:01
https://public.kitware.com/Bug/file/4093/cmake_0011536_assembler_vs10.patch
Issue History
2010-11-29 20:33Nikita BorodikhinNew Issue
2010-12-15 12:22David ColeRelationship addedrelated to 0011464
2011-01-17 14:22David ColeAssigned To => Alex Neundorf
2011-01-17 14:22David ColeStatusnew => assigned
2011-03-10 15:05Alex NeundorfRelationship addedrelated to 0009905
2011-03-10 15:05Alex NeundorfRelationship addedrelated to 0008170
2011-03-30 09:47Bill HoffmanNote Added: 0025966
2011-04-14 14:33David ColeTarget Version => CMake 2.8.5
2011-05-25 16:08Alex NeundorfNote Added: 0026579
2011-05-25 16:08Alex NeundorfAssigned ToAlex Neundorf =>
2011-05-25 16:08Alex NeundorfStatusassigned => backlog
2011-05-25 16:54David ColeNote Added: 0026590
2011-05-25 16:54David ColeTarget VersionCMake 2.8.5 =>
2011-10-18 16:47Alex NeundorfRelationship addedrelated to 0012465
2011-10-18 16:51Alex NeundorfRelationship addedrelated to 0012524
2011-10-21 01:01excitonFile Added: cmake_0011536_assembler_vs10.patch
2011-12-17 03:39Amine KhaldiNote Added: 0027998
2011-12-17 03:40Amine KhaldiNote Edited: 0027998bug_revision_view_page.php?bugnote_id=27998#r465
2011-12-21 08:29David ColeRelationship replacedhas duplicate 0012465
2012-01-03 16:23David ColeTarget Version => CMake 2.8.8
2012-04-19 08:45David ColeNote Added: 0029234
2012-04-19 08:45David ColeTarget VersionCMake 2.8.8 =>
2012-08-20 11:51David ColeStatusbacklog => new
2012-08-20 11:51David ColeTarget Version => CMake 2.8.10
2012-10-18 11:16David ColeTarget VersionCMake 2.8.10 => CMake 2.8.11
2012-10-18 11:17David ColeNote Added: 0031261
2012-10-26 16:03viktor11111Note Added: 0031344
2013-05-17 09:33Robert MaynardTarget VersionCMake 2.8.11 => CMake 2.8.12
2013-08-06 17:30Patrick R. GanstererNote Added: 0033673
2013-08-06 17:30Patrick R. GanstererAssigned To => Patrick R. Gansterer
2013-08-06 17:30Patrick R. GanstererStatusnew => resolved
2013-08-06 17:30Patrick R. GanstererResolutionopen => fixed
2013-09-11 08:31Brad KingRelationship addedrelated to 0014399
2014-01-20 09:05Brad KingRelationship addedrelated to 0014710
2014-06-02 08:38Robert MaynardNote Added: 0036088
2014-06-02 08:38Robert MaynardStatusresolved => closed

Notes
(0025966)
Bill Hoffman   
2011-03-30 09:47   
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   
2011-05-25 16:08   
I don't feel competent for adding this to the VS generators, so I'm un-assigning this one.
(0026590)
David Cole   
2011-05-25 16:54   
Not for 2.8.5 - postponing until a future release
(0027998)
Amine Khaldi   
2011-12-17 03:39   
(edited on: 2011-12-17 03:40)
Alex, regarding your reply in 0012465 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   
2012-04-19 08:45   
Unset target version, taking off roadmap.

Will put back on roadmap if somebody volunteers to take this issue on...
(0031261)
David Cole   
2012-10-18 11:17   
These bugs were deferred from target version 2.8.10 to 2.8.11 based on the responses to this email thread on the CMake developer's mailing list:

  http://public.kitware.com/pipermail/cmake-developers/2012-October/005434.html [^]
(0031344)
viktor11111   
2012-10-26 16:03   
I just attached a patch for this bug to bug report http://www.cmake.org/Bug/view.php?id=8170#c31337 [^]
(0033673)
Patrick R. Gansterer   
2013-08-06 17:30   
Merged into master: http://cmake.org/gitweb?p=cmake.git;a=commit;h=1ed726a46c11ac3b9836b210584cd90e91ae3174 [^]
(0036088)
Robert Maynard   
2014-06-02 08:38   
Closing resolved issues that have not been updated in more than 4 months.