]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
CMake: suppress MSVC warning C4127 for libtest
authorMarcel Raad <Marcel.Raad@teamviewer.com>
Fri, 5 Oct 2018 10:48:47 +0000 (12:48 +0200)
committerMarcel Raad <Marcel.Raad@teamviewer.com>
Fri, 5 Oct 2018 10:48:47 +0000 (12:48 +0200)
It's issued by older Windows SDKs (prior to version 8.0).

tests/libtest/CMakeLists.txt

index 6b14ad3e328d36dbb08ac974bd1dfbdc7ee9f9d6..aa70d053d04699b8e144d46f3dfe8913fde97b49 100644 (file)
@@ -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)