From 4c35f24ef463a2124395a8a6eb2c23e3c568e067 Mon Sep 17 00:00:00 2001 From: Marcel Raad Date: Fri, 5 Oct 2018 12:48:47 +0200 Subject: [PATCH] CMake: suppress MSVC warning C4127 for libtest It's issued by older Windows SDKs (prior to version 8.0). --- tests/libtest/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/libtest/CMakeLists.txt b/tests/libtest/CMakeLists.txt index 6b14ad3e3..aa70d053d 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)