Skip to content

Commit

Permalink
Merge pull request #268 from Dargun/fix_asm_files_language
Browse files Browse the repository at this point in the history
fix for for: visual studio missing buildtool peroperty for asm files
  • Loading branch information
olk authored Dec 26, 2024
2 parents ed4f880 + 8aa72de commit 3a2a2fb
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,18 +133,18 @@ message(STATUS "Boost.Context: "
"implementation ${BOOST_CONTEXT_IMPLEMENTATION}")

# Enable the right assembler

set(ASM_LANGUAGE)
if(BOOST_CONTEXT_IMPLEMENTATION STREQUAL "fcontext")
if(BOOST_CONTEXT_ASSEMBLER STREQUAL gas)
if(CMAKE_CXX_PLATFORM_ID MATCHES "Cygwin")
enable_language(ASM-ATT)
set(ASM_LANGUAGE ASM-ATT)
else()
enable_language(ASM)
set(ASM_LANGUAGE ASM)
endif()
elseif(BOOST_CONTEXT_ASSEMBLER STREQUAL armasm)
enable_language(ASM_ARMASM)
set(ASM_LANGUAGE ASM_ARMASM)
else()
enable_language(ASM_MASM)
set(ASM_LANGUAGE ASM_MASM)
endif()
endif()

Expand Down Expand Up @@ -177,6 +177,9 @@ if(BOOST_CONTEXT_IMPLEMENTATION STREQUAL "fcontext")
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set_property(SOURCE ${ASM_SOURCES} APPEND PROPERTY COMPILE_OPTIONS "-x" "assembler-with-cpp")
endif()

enable_language(${ASM_LANGUAGE})
set_source_files_properties(${ASM_SOURCES} PROPERTIES LANGUAGE ${ASM_LANGUAGE})
else()
set(IMPL_SOURCES
src/continuation.cpp
Expand Down

0 comments on commit 3a2a2fb

Please sign in to comment.