From 4e5e72fa12c01948fc2921961b26ac325b22a906 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Fri, 11 Oct 2024 11:36:42 +0200 Subject: [PATCH] [CMAKE] Silence ML's "Assembling ..." message --- sdk/cmake/msvc.cmake | 10 +++++++--- subsystems/mvdm/asm16.cmake | 5 ++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/sdk/cmake/msvc.cmake b/sdk/cmake/msvc.cmake index 24f59b2d833..67c2e451d7b 100644 --- a/sdk/cmake/msvc.cmake +++ b/sdk/cmake/msvc.cmake @@ -205,12 +205,16 @@ else() set(CMAKE_RC_COMPILE_OBJECT " /nologo ${I18N_DEFS} /fo ") endif() +if(MSVC_VERSION GREATER_EQUAL 1936) + set(_quiet_flag "/quiet") +endif() + # We don't put because this is handled in add_asm_files macro if (NOT MSVC_IDE) if(ARCH STREQUAL "arm" OR ARCH STREQUAL "arm64") set(CMAKE_ASM_MASM_COMPILE_OBJECT " -nologo -o ") else() - set(CMAKE_ASM_MASM_COMPILE_OBJECT " /nologo /Cp /Fo /c /Ta ") + set(CMAKE_ASM_MASM_COMPILE_OBJECT " /nologo ${_quiet_flag} /Cp /Fo /c /Ta ") endif() endif() @@ -329,7 +333,7 @@ function(generate_import_lib _libname _dllname _spec_file __version_arg) if(ARCH STREQUAL "arm" OR ARCH STREQUAL "arm64") set(_asm_stub_command ${CMAKE_ASM_MASM_COMPILER} -nologo -o ${_asm_stubs_file}.obj ${_asm_stubs_file}) else() - set(_asm_stub_command ${CMAKE_ASM_MASM_COMPILER} /nologo /Cp /Fo${_asm_stubs_file}.obj /c /Ta ${_asm_stubs_file}) + set(_asm_stub_command ${CMAKE_ASM_MASM_COMPILER} /nologo ${_quiet_flag} /Cp /Fo${_asm_stubs_file}.obj /c /Ta ${_asm_stubs_file}) endif() add_custom_command( OUTPUT ${_asm_stubs_file}.obj @@ -447,7 +451,7 @@ function(CreateBootSectorTarget _target_name _asm_file _binary_file _base_addres COMMAND ${CMAKE_C_COMPILER} /nologo ${_no_std_includes_flag} /I${REACTOS_SOURCE_DIR}/sdk/include/asm /I${REACTOS_BINARY_DIR}/sdk/include/asm ${_includes} ${_defines} /D__ASM__ /D_USE_ML /EP /c ${_asm_file} > ${_temp_file} DEPENDS ${_asm_file}) - set(_asm16_command ${CMAKE_ASM16_COMPILER} /nologo /Cp /Fo${_object_file} /c /Ta ${_temp_file}) + set(_asm16_command ${CMAKE_ASM16_COMPILER} /nologo ${_quiet_flag} /Cp /Fo${_object_file} /c /Ta ${_temp_file}) add_custom_command( OUTPUT ${_object_file} diff --git a/subsystems/mvdm/asm16.cmake b/subsystems/mvdm/asm16.cmake index 073314f308b..53d9e78abd2 100644 --- a/subsystems/mvdm/asm16.cmake +++ b/subsystems/mvdm/asm16.cmake @@ -112,7 +112,10 @@ function(add_asm16_bin _target _binary_file _base_address) 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}) - set(_pp_asm16_compile_command ${CMAKE_ASM16_COMPILER} /nologo /Cp /Fo${_object_file} /c /Ta ${_preprocessed_asm_file}) + if(MSVC_VERSION GREATER_EQUAL 1936) + set(_quiet_flag "/quiet") + endif() + set(_pp_asm16_compile_command ${CMAKE_ASM16_COMPILER} /nologo ${_quiet_flag} /Cp /Fo${_object_file} /c /Ta ${_preprocessed_asm_file}) add_custom_command( OUTPUT ${_object_file}