Skip to content

Commit 0a908bc

Browse files
committed
Make tests pass with Windows
1 parent 4a92e29 commit 0a908bc

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CMakeLists.txt

+4-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ else()
1414
set(CEREAL_THREAD_LIBS "")
1515
endif()
1616

17-
if(NOT MSVC)
18-
set(CMAKE_CXX_FLAGS "-Wall -g -Wextra -Wshadow -pedantic -Wold-style-cast ${CMAKE_CXX_FLAGS}")
17+
if(MSVC)
18+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
19+
else()
20+
set(CMAKE_CXX_FLAGS "-Wall -g -Wextra -Wshadow -pedantic -Wold-style-cast ${CMAKE_CXX_FLAGS}")
1921
option(WITH_WERROR "Compile with '-Werror' C++ compiler flag" ON)
2022
if(WITH_WERROR)
2123
set(CMAKE_CXX_FLAGS "-Werror ${CMAKE_CXX_FLAGS}")

sandbox/CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,8 @@ include_directories(sandbox_shared_lib)
1010

1111
if(Boost_FOUND)
1212
add_executable(performance performance.cpp)
13+
if(MSVC)
14+
set_target_properties(performance PROPERTIES COMPILE_DEFINITIONS "BOOST_SERIALIZATION_DYN_LINK")
15+
endif()
1316
target_link_libraries(performance ${Boost_LIBRARIES})
1417
endif(Boost_FOUND)

0 commit comments

Comments
 (0)