mirror of
https://github.com/pantor/inja.git
synced 2026-04-03 22:58:51 +00:00
add warnings for benchmark, fix for inja_throw
This commit is contained in:
@@ -80,9 +80,9 @@ if(BUILD_TESTING AND INJA_BUILD_TESTS)
|
||||
add_test(inja_test ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/inja_test)
|
||||
|
||||
if(MSVC)
|
||||
target_compile_options(inja_test PRIVATE /W4 /WX /permissive-)
|
||||
target_compile_options(inja_test PRIVATE /W4 /permissive-)
|
||||
else()
|
||||
target_compile_options(inja_test PRIVATE -Wall -Wextra -pedantic -Werror)
|
||||
target_compile_options(inja_test PRIVATE -Wall -Wextra -pedantic)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -100,6 +100,12 @@ endif()
|
||||
if(BUILD_BENCHMARK)
|
||||
add_executable(inja_benchmark test/benchmark.cpp)
|
||||
target_link_libraries(inja_benchmark PRIVATE inja)
|
||||
|
||||
if(MSVC)
|
||||
target_compile_options(inja_benchmark PRIVATE /W4 /permissive-)
|
||||
else()
|
||||
target_compile_options(inja_benchmark PRIVATE -Wall -Wextra -pedantic)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#else
|
||||
#include <cstdlib>
|
||||
#ifndef INJA_THROW
|
||||
#define INJA_THROW(exception) std::abort()
|
||||
#define INJA_THROW(exception) std::abort(); std::ignore = exception
|
||||
#endif
|
||||
#ifndef INJA_NOEXCEPTION
|
||||
#define INJA_NOEXCEPTION
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#else
|
||||
#include <cstdlib>
|
||||
#ifndef INJA_THROW
|
||||
#define INJA_THROW(exception) std::abort()
|
||||
#define INJA_THROW(exception) std::abort(); std::ignore = exception
|
||||
#endif
|
||||
#ifndef INJA_NOEXCEPTION
|
||||
#define INJA_NOEXCEPTION
|
||||
|
||||
Reference in New Issue
Block a user