Skip to content

Commit

Permalink
Suppress build: masm logo and clang warning argument unused durin…
Browse files Browse the repository at this point in the history
…g compilation
  • Loading branch information
Challanger524 committed Jan 30, 2025
1 parent 8bf61ae commit f6726cc
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,23 @@ if(BOOST_CONTEXT_IMPLEMENTATION STREQUAL "fcontext")

set(IMPL_SOURCES ${ASM_SOURCES} src/fcontext.cpp)

if(BOOST_CONTEXT_ASSEMBLER STREQUAL masm AND BOOST_CONTEXT_ARCHITECTURE STREQUAL i386)
set_source_files_properties(${ASM_SOURCES} PROPERTIES COMPILE_FLAGS "/safeseh")
if(BOOST_CONTEXT_ASSEMBLER STREQUAL masm)

set_property(SOURCE ${ASM_SOURCES} APPEND PROPERTY COMPILE_OPTIONS "/nologo")

if(MSVC AND NOT(MSVC_VERSION LESS 1936)) # Visual Studio 2022 version 17.6
set_property(SOURCE ${ASM_SOURCES} APPEND PROPERTY COMPILE_OPTIONS "/quiet")
endif()

if(BOOST_CONTEXT_ARCHITECTURE STREQUAL i386)
set_property(SOURCE ${ASM_SOURCES} APPEND PROPERTY COMPILE_OPTIONS "/safeseh")
endif()
endif()

if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set_property(SOURCE ${ASM_SOURCES} APPEND PROPERTY COMPILE_OPTIONS "-x" "assembler-with-cpp")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set_property(SOURCE ${ASM_SOURCES} APPEND PROPERTY COMPILE_OPTIONS "-Wno-unused-command-line-argument")
endif()

enable_language(${ASM_LANGUAGE})
Expand Down

0 comments on commit f6726cc

Please sign in to comment.