Skip to content

Commit

Permalink
Merge pull request #377 from AVAtarMod/main
Browse files Browse the repository at this point in the history
Fix build for MSVC 19.42
  • Loading branch information
redboltz authored Dec 5, 2024
2 parents 5243283 + 25d766b commit 455c155
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,13 @@ if(ASYNC_MQTT_USE_LOG)
endif()
target_compile_definitions(async_mqtt_separate PRIVATE ASYNC_MQTT_SEPARATE_COMPILATION)

macro(fix_msvc_build)
message(STATUS "MSVC build fix applied")
target_compile_options(async_mqtt_separate PRIVATE "/Zc:preprocessor" "/bigobj")
endmacro()

if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
fix_msvc_build()
endif()

target_link_libraries(async_mqtt_separate async_mqtt_iface)

0 comments on commit 455c155

Please sign in to comment.