File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -42,16 +42,18 @@ macro(configure_tests target)
4242 )
4343
4444 # Add warnings
45- if (CMAKE_CXX_COMPILER_FRONTEND_VARIANT MATCHES "GNU" )
45+ if (CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "GNU" )
4646 target_compile_options (${target} PRIVATE
4747 -Wall -Wextra -Wcast-align -Wmissing-declarations -Wmissing-include -dirs
4848 -Wnon-virtual-dtor -Wodr -Wpedantic -Wredundant-decls -Wundef -Wunreachable-code
4949 $<$<CXX_COMPILER_ID:GNU>:-Wlogical-op -Wuseless-cast>
5050 )
51+ elseif (MSVC )
52+ target_compile_options (${target} PRIVATE /W4)
5153 endif ()
5254
5355 # Configure optimization options
54- if (CMAKE_CXX_COMPILER_FRONTEND_VARIANT MATCHES "GNU" )
56+ if (CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "GNU" )
5557 target_compile_options (${target} PRIVATE
5658 $<$<AND :$<CONFIG:Debug>,$<CXX_COMPILER_ID:Clang>>:-O0>
5759 $<$<AND :$<CONFIG:Debug>,$<CXX_COMPILER_ID:GNU>>:-Og>
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ TEST_CASE( "generalized callables" ) {
6060 CHECK (is_vec_sorted ());
6161 }
6262
63- std::uniform_int_distribution<int > random_middle (0 , vec.size ());
63+ std::uniform_int_distribution<int > random_middle (0 , static_cast < int >( vec.size () ));
6464
6565 SECTION ( " timmerge for comparisons" ) {
6666 const auto middle = vec.begin () + random_middle (gen);
You can’t perform that action at this time.
0 commit comments