Skip to content

Commit fb0f3ea

Browse files
committed
Only enable ASM-ATT on Cygwin, and ASM otherwise
1 parent c16e222 commit fb0f3ea

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

CMakeLists.txt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,11 @@ message(STATUS "Boost.Context: "
9797

9898
if(BOOST_CONTEXT_IMPLEMENTATION STREQUAL "fcontext")
9999
if(BOOST_CONTEXT_ASSEMBLER STREQUAL gas)
100-
enable_language(ASM-ATT)
100+
if(CMAKE_CXX_PLATFORM_ID MATCHES "Cygwin")
101+
enable_language(ASM-ATT)
102+
else()
103+
enable_language(ASM)
104+
endif()
101105
else()
102106
enable_language(ASM_MASM)
103107
endif()
@@ -125,13 +129,8 @@ if(BOOST_CONTEXT_IMPLEMENTATION STREQUAL "fcontext")
125129

126130
set(IMPL_SOURCES ${ASM_SOURCES})
127131

128-
if(BOOST_CONTEXT_ASSEMBLER STREQUAL masm)
129-
set_source_files_properties(${ASM_SOURCES} PROPERTIES LANGUAGE "ASM_MASM")
130-
if(BOOST_CONTEXT_ARCHITECTURE STREQUAL i386)
132+
if(BOOST_CONTEXT_ASSEMBLER STREQUAL masm AND BOOST_CONTEXT_ARCHITECTURE STREQUAL i386)
131133
set_source_files_properties(${ASM_SOURCES} PROPERTIES COMPILE_FLAGS "/safeseh")
132-
endif()
133-
elseif(BOOST_CONTEXT_ASSEMBLER STREQUAL gas)
134-
set_source_files_properties(${ASM_SOURCES} PROPERTIES LANGUAGE "ASM-ATT")
135134
endif()
136135

137136
else()

0 commit comments

Comments
 (0)