diff options
author | Sergei Golubchik <serg@mariadb.org> | 2022-05-08 15:02:19 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2022-05-08 23:03:08 +0200 |
commit | a70a1cf3f4ed10c9d9194b2b8df6b6f08551a937 (patch) | |
tree | 517124ec5059f48bff1e02b934355e8162183efc /configure.cmake | |
parent | 40b8f3ec1a76fc23eb6bf9c5a8fef1debcbf5843 (diff) | |
parent | 79660e59ee8fcd23f928c72dc77682b875bd58ce (diff) | |
download | mariadb-git-a70a1cf3f4ed10c9d9194b2b8df6b6f08551a937.tar.gz |
Merge branch '10.3' into 10.4
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 634ae1d4940..6c44e799624 100644 --- a/configure.cmake +++ b/configure.cmake @@ -989,3 +989,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() |