[MVDM] hack-fix Clang-CL build
[reactos.git] / subsystems / mvdm / asm16.cmake
index 8cc77dd..7d4832f 100644 (file)
@@ -113,10 +113,16 @@ function(add_asm16_bin _target _binary_file _base_address)
     endif()
 
     add_custom_command(
-        OUTPUT ${_preprocessed_asm_file} ${_object_file}
-        COMMAND ${CMAKE_C_COMPILER} /nologo ${_no_std_includes_flag} /I${REACTOS_SOURCE_DIR}/sdk/include/asm /I${REACTOS_BINARY_DIR}/sdk/include/asm ${_directory_includes} ${_source_file_defines} ${_directory_defines} /D__ASM__ /D_USE_ML /EP /c ${_concatenated_asm_file} > ${_preprocessed_asm_file} && ${_pp_asm16_compile_command}
+        OUTPUT ${_preprocessed_asm_file}
+        #COMMAND ${CMAKE_C_COMPILER} /nologo ${_no_std_includes_flag} /I${REACTOS_SOURCE_DIR}/sdk/include/asm /I${REACTOS_BINARY_DIR}/sdk/include/asm ${_directory_includes} ${_source_file_defines} ${_directory_defines} /D__ASM__ /D_USE_ML /EP /c ${_concatenated_asm_file} > ${_preprocessed_asm_file}
+        COMMAND cl /nologo /X /I${REACTOS_SOURCE_DIR}/sdk/include/asm /I${REACTOS_BINARY_DIR}/sdk/include/asm ${_directory_includes} ${_source_file_defines} ${_directory_defines} /D__ASM__ /D_USE_ML /EP /c ${_concatenated_asm_file} > ${_preprocessed_asm_file}
         DEPENDS ${_concatenated_asm_file})
 
+    add_custom_command(
+        OUTPUT ${_object_file}
+        COMMAND ${_pp_asm16_compile_command}
+        DEPENDS ${_preprocessed_asm_file})
+
     add_custom_command(
         OUTPUT ${_binary_file}
         COMMAND native-obj2bin ${_object_file} ${_binary_file} ${_base_address}