MantisBT - CMake
View Issue Details
0014153CMakeCMakepublic2013-05-17 02:072013-10-07 10:09
Marc Costa 
Brad King 
normalminoralways
closedfixed 
Visual Studio 2012Windows7
CMake 2.8.10.2 
CMake 2.8.12CMake 2.8.12 
0014153: Visual Studio project wrong AssemblerListingLocation (/Fa) default (and override!)
Using the Visual Studio 11 (Win64) generator, I get .vcxproj with the option <AssemblerListingLocation> set to CMAKE_BUILD_TYPE (Debug, Release, etc...), i.e:

<AssemblerListingLocation>Debug<AssemblerListingLocation>

If I explicitly set this option (e.g. /Fa$(IntDir) or /FaDebug\), the project file will contain two AssemblerListingLocation definitions per build type, the last one taking precedence over the first one. The last one is the CMake's default.

It is indeed a problem not to let me set my own variable, but the main problem is that the default is wrong. Setting it to CMAKE_BUILD_TYPE will generate build errors when specifying the Generate Assembly options (/FA family) since Visual Studio will consider CMAKE_BUILD_TYPE a file name instead of a directory name (i.e. Debug instead of Debug\) and so fail to compile multiple files (error D8036: '/FaDebug' not allowed with multiple source files).
Generate a simple Visual Studio project with more than one file to build (.cpp). Set VS to generate assembly files (e.g. /FA).
asm, c++, solution, visual studio
has duplicate 0014171closed Brad King "ASM List Location" Path Error 
zip CMake_error.zip (27,364) 2013-05-17 02:07
https://public.kitware.com/Bug/file/4761/CMake_error.zip
patch edeabd18+0001-VS-Allow-Fa-to-set-AssemblerListingLocation-14153.patch (3,432) 2013-05-17 08:38
https://public.kitware.com/Bug/file/4762/edeabd18%2B0001-VS-Allow-Fa-to-set-AssemblerListingLocation-14153.patch
patch edeabd18+0001-VS-Allow-Fa-to-set-AssemblerListingLocation-14153-2.patch (3,736) 2013-05-20 08:42
https://public.kitware.com/Bug/file/4763/edeabd18%2B0001-VS-Allow-Fa-to-set-AssemblerListingLocation-14153-2.patch
Issue History
2013-05-17 02:07Marc CostaNew Issue
2013-05-17 02:07Marc CostaFile Added: CMake_error.zip
2013-05-17 05:05Marc CostaTag Attached: asm
2013-05-17 05:06Marc CostaTag Attached: c++
2013-05-17 05:06Marc CostaTag Attached: solution
2013-05-17 05:06Marc CostaTag Attached: visual studio
2013-05-17 08:38Brad KingFile Added: edeabd18+0001-VS-Allow-Fa-to-set-AssemblerListingLocation-14153.patch
2013-05-17 08:39Brad KingNote Added: 0033084
2013-05-17 08:39Brad KingAssigned To => Brad King
2013-05-17 08:39Brad KingStatusnew => assigned
2013-05-17 08:39Brad KingTarget Version => CMake 2.8.12
2013-05-17 08:45Marc CostaNote Added: 0033085
2013-05-18 00:55Marc CostaNote Added: 0033093
2013-05-20 08:42Brad KingFile Added: edeabd18+0001-VS-Allow-Fa-to-set-AssemblerListingLocation-14153-2.patch
2013-05-20 08:42Brad KingNote Added: 0033099
2013-05-20 15:00Marc CostaNote Added: 0033103
2013-05-20 15:00Marc CostaNote Edited: 0033103bug_revision_view_page.php?bugnote_id=33103#r1166
2013-05-20 15:29Brad KingNote Added: 0033104
2013-05-20 15:29Brad KingStatusassigned => resolved
2013-05-20 15:29Brad KingResolutionopen => fixed
2013-05-20 15:29Brad KingFixed in Version => CMake 2.8.12
2013-05-28 09:37Brad KingRelationship addedhas duplicate 0014171
2013-10-07 10:09Robert MaynardNote Added: 0034066
2013-10-07 10:09Robert MaynardStatusresolved => closed

Notes
(0033084)
Brad King   
2013-05-17 08:39   
Please try attached edeabd18+0001-VS-Allow-Fa-to-set-AssemblerListingLocation-14153.patch
(0033085)
Marc Costa   
2013-05-17 08:45   
I am currently using a pre-build CMake 2.8.10, but I guess I should build CMake from source to apply the patch, right?

I'll do it as soon as I can!

Thanks!
(0033093)
Marc Costa   
2013-05-18 00:55   
Overwriting the value now works!

The default value is still wrong, though. No defining the compiler option still produces:

<AssemblerListingLocation>Debug<AssemblerListingLocation> (for Debug builds)

which is wrong. The correct value should be:

<AssemblerListingLocation>Debug\<AssemblerListingLocation> (note the \ after Debug)

which is a directory name, not a file name.

Thanks!
(0033099)
Brad King   
2013-05-20 08:42   
Thanks for testing. Please try edeabd18+0001-VS-Allow-Fa-to-set-AssemblerListingLocation-14153-2.patch for the fixed default.
(0033103)
Marc Costa   
2013-05-20 15:00   
Now it's totally fixed! Thank you!

(0033104)
Brad King   
2013-05-20 15:29   
Great, thanks again for testing. Applied:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7e0c45e9 [^]
(0034066)
Robert Maynard   
2013-10-07 10:09   
Closing resolved issues that have not been updated in more than 4 months.