Use modern cmake approach for flags. Fixed VS2015 warning
This commit is contained in:
parent
1a23a9fd4a
commit
77a074c5be
@ -148,12 +148,10 @@ foreach(file ${files})
|
||||
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wno-deprecated;-Wno-float-equal>
|
||||
$<$<CXX_COMPILER_ID:GNU>:-Wno-deprecated-declarations>
|
||||
)
|
||||
# Force to compile with highest warning level and treat warnings as errors
|
||||
if(MSVC)
|
||||
target_compile_options(${testcase} PRIVATE /W4 /WX)
|
||||
else()
|
||||
target_compile_options(${testcase} PRIVATE -Wall -Wextra -pedantic -Werror)
|
||||
endif()
|
||||
target_compile_options(${testcase} PRIVATE
|
||||
$<$<CXX_COMPILER_ID:MSVC>:/W4;/WX>>
|
||||
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wall;-Wextra;-pedantic;-Werror>>
|
||||
)
|
||||
target_include_directories(${testcase} PRIVATE
|
||||
thirdparty/doctest
|
||||
thirdparty/fifo_map
|
||||
|
||||
@ -98,6 +98,8 @@ struct my_allocator : std::allocator<T>
|
||||
{
|
||||
if (next_deallocate_fails)
|
||||
{
|
||||
(void)p; // Ignored unused
|
||||
(void)n; // ignored unused
|
||||
next_deallocate_fails = false;
|
||||
throw std::bad_alloc();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user