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>
|
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wno-deprecated;-Wno-float-equal>
|
||||||
$<$<CXX_COMPILER_ID:GNU>:-Wno-deprecated-declarations>
|
$<$<CXX_COMPILER_ID:GNU>:-Wno-deprecated-declarations>
|
||||||
)
|
)
|
||||||
# Force to compile with highest warning level and treat warnings as errors
|
target_compile_options(${testcase} PRIVATE
|
||||||
if(MSVC)
|
$<$<CXX_COMPILER_ID:MSVC>:/W4;/WX>>
|
||||||
target_compile_options(${testcase} PRIVATE /W4 /WX)
|
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wall;-Wextra;-pedantic;-Werror>>
|
||||||
else()
|
)
|
||||||
target_compile_options(${testcase} PRIVATE -Wall -Wextra -pedantic -Werror)
|
|
||||||
endif()
|
|
||||||
target_include_directories(${testcase} PRIVATE
|
target_include_directories(${testcase} PRIVATE
|
||||||
thirdparty/doctest
|
thirdparty/doctest
|
||||||
thirdparty/fifo_map
|
thirdparty/fifo_map
|
||||||
|
|||||||
@ -98,6 +98,8 @@ struct my_allocator : std::allocator<T>
|
|||||||
{
|
{
|
||||||
if (next_deallocate_fails)
|
if (next_deallocate_fails)
|
||||||
{
|
{
|
||||||
|
(void)p; // Ignored unused
|
||||||
|
(void)n; // ignored unused
|
||||||
next_deallocate_fails = false;
|
next_deallocate_fails = false;
|
||||||
throw std::bad_alloc();
|
throw std::bad_alloc();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user