Visual Studio project wrong AssemblerListingLocation (/Fa) default (and override!)
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
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
).