MantisBT - CMake
View Issue Details
0014710CMakeCMakepublic2014-01-20 05:082016-06-10 14:31
Evgeny Grin 
Patrick R. Gansterer 
CMake 2.8.12 
0014710: Wrong value in VS .vcxproj project file
Same for Visual Studio 10/11/12.

Set additional properties for asm files by

set_source_files_properties(${SOURCE_ASMS} PROPERTIES COMPILE_FLAGS /W2)

CMake produce .vcxproj with wrong string

      <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Level2</WarningLevel>

that fail to compile with error

error MSB3693: Unable to execute Xaml task. The value "Level2" specified for task parameter "WarningLevel" is not valid.

correct format is
      <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">2</WarningLevel>
asm, masm, visual studio, windows
related to 0011536closed Patrick R. Gansterer Can't use assembler files with Visual Studio 10 generator 
related to 0014711closed Alex Neundorf CMAKE_ASM_MASM_FLAGS and CMAKE_ASM_MASM_FLAGS_xx have no effect 
Issue History
2014-01-20 05:08Evgeny GrinNew Issue
2014-01-20 05:10Evgeny GrinTag Attached: asm
2014-01-20 05:10Evgeny GrinTag Attached: masm
2014-01-20 05:10Evgeny GrinTag Attached: visual studio
2014-01-20 05:10Evgeny GrinTag Attached: windows
2014-01-20 05:14Evgeny GrinNote Added: 0034963
2014-01-20 09:05Brad KingAssigned To => Patrick R. Gansterer
2014-01-20 09:05Brad KingStatusnew => assigned
2014-01-20 09:05Brad KingRelationship addedrelated to 0011536
2014-01-20 09:06Brad KingRelationship addedrelated to 0014711
2014-01-20 12:09Evgeny GrinNote Edited: 0034963bug_revision_view_page.php?bugnote_id=34963#r1378
2016-06-10 14:29Kitware RobotNote Added: 0042466
2016-06-10 14:29Kitware RobotStatusassigned => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:31Kitware RobotStatusresolved => closed

Evgeny Grin   
2014-01-20 05:14   
(edited on: 2014-01-20 12:09)
This problem is only for .ASM files.
Full file configuration from CMake-generated .vcxproj file:

    <MASM Include="..\src\optm.asm" >
      <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Level2</WarningLevel>
      <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Level2</WarningLevel>
      <WarningLevel Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">Level2</WarningLevel>
      <WarningLevel Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">Level2</WarningLevel>

If edited from "Level2" to "2", Visual Studio compile project without errors.

Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.