]> The Tcpdump Group git mirrors - libpcap/commitdiff
CMake: Fix EXTRA_CFLAGS after commit 29d7856. [skip appveyor]
authorDenis Ovsienko <[email protected]>
Tue, 3 Aug 2021 21:34:14 +0000 (22:34 +0100)
committerDenis Ovsienko <[email protected]>
Tue, 3 Aug 2021 21:37:05 +0000 (22:37 +0100)
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.

CMakeLists.txt

index 388edd203ffa3d73433e1a676eaff088461391cc..fdd91800f428a46bfcc5ec3bcc4ff1e74de48ff3 100644 (file)
@@ -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()