ENH: add support for the MS masm and masm64 assemblers, works with nmake,
not (yet) with the Visual Studio generators Alex
This commit is contained in:
parent
49db4e53a1
commit
19046aa98c
|
@ -0,0 +1,10 @@
|
|||
# support for the MS assembler, masm and masm64
|
||||
|
||||
SET(ASM_DIALECT "_MASM")
|
||||
|
||||
SET(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS asm)
|
||||
|
||||
SET(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <FLAGS> /c /Fo <OBJECT> <SOURCE>")
|
||||
|
||||
INCLUDE(CMakeASMInformation)
|
||||
SET(ASM_DIALECT)
|
|
@ -1,4 +1,4 @@
|
|||
# determine the compiler to use for ASM using AT&T syntax
|
||||
# determine the compiler to use for ASM using AT&T syntax, e.g. GNU as
|
||||
|
||||
SET(ASM_DIALECT "-ATT")
|
||||
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT ${_CMAKE_TOOLCHAIN_PREFIX}gas ${_CMAKE_TOOLCHAIN_PREFIX}as)
|
||||
|
|
|
@ -17,7 +17,7 @@ IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
|
|||
IF (_CMAKE_USER_CXX_COMPILER_PATH OR _CMAKE_USER_C_COMPILER_PATH)
|
||||
FIND_PROGRAM(CMAKE_ASM${ASM_DIALECT}_COMPILER NAMES ${CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST} PATHS ${_CMAKE_USER_C_COMPILER_PATH} ${_CMAKE_USER_CXX_COMPILER_PATH} DOC "Assembler" NO_DEFAULT_PATH)
|
||||
ENDIF (_CMAKE_USER_CXX_COMPILER_PATH OR _CMAKE_USER_C_COMPILER_PATH)
|
||||
FIND_PROGRAM(CMAKE_ASM${ASM_DIALECT}_COMPILER NAMES ${CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST} DOC "Assembler")
|
||||
FIND_PROGRAM(CMAKE_ASM${ASM_DIALECT}_COMPILER NAMES ${CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST} PATHS ${_CMAKE_TOOLCHAIN_LOCATION} DOC "Assembler")
|
||||
|
||||
ELSE(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
|
||||
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
# Find the MS assembler (masm or masm64)
|
||||
|
||||
SET(ASM_DIALECT "_MASM")
|
||||
|
||||
# if we are using the 64bit cl compiler, assume we also want the 64bit assembler
|
||||
IF(CMAKE_CL_64)
|
||||
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT ml64)
|
||||
ELSE(CMAKE_CL_64)
|
||||
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT ml)
|
||||
ENDIF(CMAKE_CL_64)
|
||||
|
||||
INCLUDE(CMakeDetermineASMCompiler)
|
||||
SET(ASM_DIALECT)
|
|
@ -4,6 +4,7 @@
|
|||
# and link the most basic of programs. If not, a fatal error
|
||||
# is set and cmake stops processing commands and will not generate
|
||||
# any makefiles or projects.
|
||||
|
||||
SET(ASM_DIALECT "-ATT")
|
||||
INCLUDE(CMakeTestASMCompiler)
|
||||
SET(ASM_DIALECT)
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
# This file is used by EnableLanguage in cmGlobalGenerator to
|
||||
# determine that the selected ASM_MASM "compiler" (should be masm or masm64)
|
||||
# can actually "compile" and link the most basic of programs. If not, a
|
||||
# fatal error is set and cmake stops processing commands and will not generate
|
||||
# any makefiles or projects.
|
||||
|
||||
SET(ASM_DIALECT "_MASM")
|
||||
INCLUDE(CMakeTestASMCompiler)
|
||||
SET(ASM_DIALECT)
|
Loading…
Reference in New Issue