Merge topic 'masm-static-lib'

faadb86474 ASM_MASM: Add support for masm-only static libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9612
This commit is contained in:
Brad King
2024-06-21 14:41:53 +00:00
committed by Kitware Robot
6 changed files with 6 additions and 0 deletions

View File

@@ -9,6 +9,7 @@ set(ASM_DIALECT "_MARMASM")
set(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS asm)
set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <INCLUDES> <FLAGS> -o <OBJECT> <SOURCE>")
set(CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY "<CMAKE_AR> <LINK_FLAGS> /out:<TARGET> <OBJECTS> ")
# The ASM_MARMASM compiler id for this compiler is "MSVC", so fill out the runtime library table.
set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreaded "")

View File

@@ -9,6 +9,7 @@ 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> <DEFINES> <INCLUDES> <FLAGS> -c -Fo <OBJECT> <SOURCE>")
set(CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY "<CMAKE_AR> <LINK_FLAGS> /out:<TARGET> <OBJECTS> ")
# The ASM_MASM compiler id for this compiler is "MSVC", so fill out the runtime library table.
set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreaded "")

View File

@@ -4,3 +4,4 @@ add_executable(VSMARMASM main.c foo.asm)
target_compile_options(VSMARMASM PRIVATE
"$<$<COMPILE_LANGUAGE:ASM_MARMASM>:SHELL:-predefine \"zero SETA 0\">"
)
add_library(empty STATIC empty.asm)

View File

@@ -0,0 +1 @@
end

View File

@@ -10,3 +10,4 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
add_executable(VSMASM main.c foo.asm)
target_compile_definitions(VSMASM PUBLIC DEF_FOO)
target_compile_options(VSMASM PUBLIC -DDEF_BAR)
add_library(empty STATIC empty.asm)

1
Tests/VSMASM/empty.asm Normal file
View File

@@ -0,0 +1 @@
end