From: Denis Ovsienko Date: Tue, 3 Aug 2021 21:34:14 +0000 (+0100) Subject: CMake: Fix EXTRA_CFLAGS after commit 29d7856. [skip appveyor] X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/815b367d5bafe2bebcc0aa6ff8f54f21c4efafc5 CMake: Fix EXTRA_CFLAGS after commit 29d7856. [skip appveyor] check_and_add_compiler_option() takes a string, not a variable. Get it right this time and run CMake builds with a warnings guard again. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 388edd20..fdd91800 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2060,7 +2060,7 @@ endif(NOT MSVC) # if(NOT "${EXTRA_CFLAGS}" STREQUAL "") foreach(_extra_cflag ${EXTRA_CFLAGS}) - check_and_add_compiler_option(_extra_cflag) + check_and_add_compiler_option("${_extra_cflag}") endforeach(_extra_cflag) message(STATUS "Added extra compile options (${EXTRA_CFLAGS})") endif()