VS: ASM_MASM not adding target_compile_options() to the ml.exe command
Ran into this issue from StackOverflow
when trying to assemble a MASM project using cmake version 3.24.3, the target_compile_options()
below
if(WIN32)
target_compile_options(HelloWorld
PUBLIC
/DBUILD_HelloWorld
/FlHelloWorld.lst
)
target_link_options(HelloWorld
PUBLIC
/SUBSYSTEM:Console,6.01
/SAFESEH:NO
)
...
are not added to the MASM command
[Build:x86] ml.exe /c /nologo /Zi /Fo"HelloWorld.dir\Debug\CodeBaseEND.obj" /D"CMAKE_INTDIR="Debug"" ...
However, during the linking phase, the target_link_options()
are added
[Build:x86] C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\bin\HostX64\x86\link.exe /ERRORREPORT:QUEUE ... /SAFESEH:NO /SUBSYSTEM:Console,6.01
The root CMakeLists.txt
file has these languages defined
project(HelloWorld VERSION 1.0.0 LANGUAGES C CXX ASM_MASM)
Any ideas why the compile options are omitted or where the fix might be?
Thanks.