Skip to content

Commit

Permalink
Only enable ASM-ATT on Cygwin, and ASM otherwise
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimov committed Jun 2, 2021
1 parent c16e222 commit fb0f3ea
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ message(STATUS "Boost.Context: "

if(BOOST_CONTEXT_IMPLEMENTATION STREQUAL "fcontext")
if(BOOST_CONTEXT_ASSEMBLER STREQUAL gas)
enable_language(ASM-ATT)
if(CMAKE_CXX_PLATFORM_ID MATCHES "Cygwin")
enable_language(ASM-ATT)
else()
enable_language(ASM)
endif()
else()
enable_language(ASM_MASM)
endif()
Expand Down Expand Up @@ -125,13 +129,8 @@ if(BOOST_CONTEXT_IMPLEMENTATION STREQUAL "fcontext")

set(IMPL_SOURCES ${ASM_SOURCES})

if(BOOST_CONTEXT_ASSEMBLER STREQUAL masm)
set_source_files_properties(${ASM_SOURCES} PROPERTIES LANGUAGE "ASM_MASM")
if(BOOST_CONTEXT_ARCHITECTURE STREQUAL i386)
if(BOOST_CONTEXT_ASSEMBLER STREQUAL masm AND BOOST_CONTEXT_ARCHITECTURE STREQUAL i386)
set_source_files_properties(${ASM_SOURCES} PROPERTIES COMPILE_FLAGS "/safeseh")
endif()
elseif(BOOST_CONTEXT_ASSEMBLER STREQUAL gas)
set_source_files_properties(${ASM_SOURCES} PROPERTIES LANGUAGE "ASM-ATT")
endif()

else()
Expand Down

0 comments on commit fb0f3ea

Please sign in to comment.