diff --git a/rosbag2_transport/CMakeLists.txt b/rosbag2_transport/CMakeLists.txt index a83e553ebd..d292a7a3fe 100644 --- a/rosbag2_transport/CMakeLists.txt +++ b/rosbag2_transport/CMakeLists.txt @@ -14,6 +14,11 @@ endif() if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") add_compile_options(-Wall -Wextra -Wpedantic) endif() +if(CMAKE_BUILD_TYPE STREQUAL "Debug" AND MSVC) + # /bigobj is needed to avoid error C1128: + # https://msdn.microsoft.com/en-us/library/8578y171.aspx + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") +endif() # Windows supplies macros for min and max by default. We should only use min and max from stl if(WIN32)