Cannot set ASM_MASM flags?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Cannot set ASM_MASM flags?

Tiago Macarios
I am trying to set a flag for the Microsoft assembler, but no luck. Dummy repro below.
I tried setting target_compile_options, but that seems not to work. Then I tried setting CMAKE_ASM_MASM_FLAGS, but that does not seem to work either.

If indeed this is a CMake problem. Maybe someone knows of a work around?

cmake_minimum_required(VERSION 3.11)


add_executable(AsmTest AsmTestFunc.asm)
#target_compile_options(AsmTest PRIVATE /Sg)
target_link_options(AsmTest PRIVATE /SAFESEH:NO)
target_link_libraries(AsmTest kernel32.lib)

.model flat,stdcall
.stack 4096
ExitProcess PROTO, dwExitCode:DWORD
main PROC
INVOKE ExitProcess,0
main ENDP
END main


Powered by

Please keep messages on-topic and check the CMake FAQ at:

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support:
CMake Consulting:
CMake Training Courses:

Visit other Kitware open-source projects at

Follow this link to subscribe/unsubscribe: