Skip to content

Commit e7d6878

Browse files
Stuart Dootsonmurraycu
authored andcommitted
MSVC build: Disable C4244 (conversion, possible loss of data) for relevant tests
1 parent b74406a commit e7d6878

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ function (add_sigcpp_test TEST_SOURCE_FILE)
6464
add_test (NAME ${test_name}
6565
# Help MSVC to find the library that the tests should link against.
6666
COMMAND ${CMAKE_COMMAND} -E env "PATH=$<TARGET_FILE_DIR:sigc-${SIGCXX_API_VERSION}>;$ENV{PATH}" $<TARGET_FILE:${test_name}>)
67+
68+
if (MSVC AND test_name MATCHES "^(test_retype_return|test_signal)$")
69+
target_compile_options(${test_name} PRIVATE "/wd4244")
70+
endif()
6771
endfunction (add_sigcpp_test)
6872

6973
foreach (test_file ${TEST_SOURCE_FILES})

0 commit comments

Comments
 (0)