From: Marcel Raad Date: Fri, 5 Oct 2018 10:48:47 +0000 (+0200) Subject: CMake: suppress MSVC warning C4127 for libtest X-Git-Tag: curl-7_62_0~97 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4c35f24ef463a2124395a8a6eb2c23e3c568e067;p=thirdparty%2Fcurl.git CMake: suppress MSVC warning C4127 for libtest It's issued by older Windows SDKs (prior to version 8.0). --- diff --git a/tests/libtest/CMakeLists.txt b/tests/libtest/CMakeLists.txt index 6b14ad3e32..aa70d053d0 100644 --- a/tests/libtest/CMakeLists.txt +++ b/tests/libtest/CMakeLists.txt @@ -1,5 +1,9 @@ set(TARGET_LABEL_PREFIX "Test ") +if(MSVC) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4127") +endif() + function(setup_test TEST_NAME) # ARGN are the files in the test add_executable( ${TEST_NAME} ${ARGN} ) string(TOUPPER ${TEST_NAME} UPPER_TEST_NAME)