In build system generated (Visual Studio 2017 Generator) with the following cmake, the 'test.asm' source file isn't compiled with the preprocessor definition MY_MASM_DEFINITION:
cmake_minimum_required(VERSION 3.14)
project("test")
enable_language(CXX)
enable_language(ASM_MASM)
add_library(Problem STATIC "test.asm")
target_compile_definitions(Problem PUBLIC "MY_MASM_DEFINITION")
The same is true if I set CMAKE_ASM_MASM_FLAGS
, or use set_target_properties
.
It does work if I use set_source_files_properties
, but setting this on each source file will not work well in our build system.
Am I doing something wrong?
Is there a workaround other than using set_source_files_properties
?
Thanks in advance.