diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2022-05-03 10:59:54 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2022-05-03 10:59:54 +0200 |
commit | 9614fde1aac6ffa4745804342ff70a96b2418e30 (patch) | |
tree | d53f4578ce0a6b5cf30f3eef854d50c16fbabcee /configure.cmake | |
parent | 182b8a29e7a1a0f0fbffeed39518c2c9dc026e13 (diff) | |
parent | 70555454b4c224e85383d482411961c7f2eba2e2 (diff) | |
download | mariadb-git-9614fde1aac6ffa4745804342ff70a96b2418e30.tar.gz |
Merge branch '10.2' into 10.3
Diffstat (limited to 'configure.cmake')
-rw-r--r-- | configure.cmake | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/configure.cmake b/configure.cmake index cbcdab5e4f9..652b77b22bd 100644 --- a/configure.cmake +++ b/configure.cmake @@ -1018,3 +1018,19 @@ IF(NOT MSVC) HAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE ) ENDIF() + +MY_CHECK_C_COMPILER_FLAG("-Werror") +IF(have_C__Werror) + SET(SAVE_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS}) + SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror") + CHECK_C_SOURCE_COMPILES(" + #include <unistd.h> + int main() + { + pid_t pid=vfork(); + return (int)pid; + }" + HAVE_VFORK + ) + SET(CMAKE_REQUIRED_FLAGS ${SAVE_CMAKE_REQUIRED_FLAGS}) +ENDIF() |