add warnings for benchmark, fix for inja_throw

This commit is contained in:
pantor
2021-06-17 20:03:40 +02:00
parent e91a2fd350
commit 9cf7db8a06
3 changed files with 10 additions and 4 deletions

View File

@@ -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()