ASM_MASM: Fix selection of ml64

Recognize 64-bit platforms based on the C or CXX architecture or
the platform specified with a VS generator name.
This commit is contained in:
Brad King 2014-08-13 14:44:52 -04:00
parent 0374abdb18
commit d7866c52c9
1 changed files with 2 additions and 1 deletions

View File

@ -17,7 +17,8 @@
set(ASM_DIALECT "_MASM") set(ASM_DIALECT "_MASM")
# if we are using the 64bit cl compiler, assume we also want the 64bit assembler # if we are using the 64bit cl compiler, assume we also want the 64bit assembler
if(CMAKE_CL_64) if(";${CMAKE_VS_PLATFORM_NAME};${MSVC_C_ARCHITECTURE_ID};${MSVC_CXX_ARCHITECTURE_ID};"
MATCHES ";(Win64|Itanium|x64|IA64);")
set(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT ml64) set(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT ml64)
else() else()
set(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT ml) set(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT ml)