Being more narrow.

This commit is contained in:
Daniel Lemire 2021-06-07 09:59:44 -04:00
parent a721b344b4
commit 2504268bbf

View File

@ -33,9 +33,10 @@ target_compile_definitions(supplemental-data INTERFACE SUPPLEMENTAL_TEST_DATA_DI
function(fast_float_add_cpp_test TEST_NAME) function(fast_float_add_cpp_test TEST_NAME)
add_executable(${TEST_NAME} ${TEST_NAME}.cpp) add_executable(${TEST_NAME} ${TEST_NAME}.cpp)
add_test(${TEST_NAME} ${TEST_NAME}) add_test(${TEST_NAME} ${TEST_NAME})
if(WIN32) if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
target_compile_options(${TEST_NAME} PUBLIC /EHsc) target_compile_options(${TEST_NAME} PUBLIC /EHsc)
else() endif()
if(NOT WIN32)
target_compile_options(${TEST_NAME} PUBLIC -Werror -Wall -Wextra -Weffc++) target_compile_options(${TEST_NAME} PUBLIC -Werror -Wall -Wextra -Weffc++)
target_compile_options(${TEST_NAME} PUBLIC -Wsign-compare -Wshadow -Wwrite-strings -Wpointer-arith -Winit-self -Wconversion -Wsign-conversion) target_compile_options(${TEST_NAME} PUBLIC -Wsign-compare -Wshadow -Wwrite-strings -Wpointer-arith -Winit-self -Wconversion -Wsign-conversion)
endif() endif()