CMAKE_ASM_NASM_OBJECT_FORMAT is not documented
The mentioned flag doesn't affect the actual command line of nasm.
I am defining a target in the following way:
set_source_files_properties(entry.S PROPERTIES LANGUAGE ASM_NASM)
set(CMAKE_ASM_NASM_OBJECT_FORMAT elf32)
add_library(kernel_entry OBJECT ${KERNEL_ENTRY_SOURCE})
set_target_properties(kernel_entry PROPERTIES NASM_OBJ_FORMAT elf32)
The nasm line which is generated by CMAKE is:
nasm ... -f elf64 entry.S
When I am trying to link it with other 32 bit programs I am obviously get an error for trying to link 32 and 64 bit programs.
It's simply ignores the flag which doesn't let me to compile the nasm file to elf32 format.
I am kind of new to cmake so I maybe wrong about the way I used it. But it seems kind of broken.
Edited by Brad King