aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJoão Valverde <j@v6e.pt>2021-09-22 15:57:43 +0100
committerWireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2021-09-22 16:34:37 +0000
commitfa525649bea7ee6ec14958e123b386755d0518ac (patch)
treeb1ac2bd68dbd5b3a7990b43ae6067c63a3c03332 /CMakeLists.txt
parent9bce34ca67d1f057c2fcb910c030d2a160c69ade (diff)
CMake: Try to set a required try_run() definition in a more idiomatic way
This is applicable to every test (if we had more), not just HAVE_C99_VSNPRINTF. Could also be a #define but let's go with this for now. This takes advantage of the stack based design of CMakePushCheckState.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c23b3037dd..eac75e17f3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -472,6 +472,7 @@ if(MINGW)
#
-D_POSIX
)
+ list(APPEND CMAKE_REQUIRED_DEFINITIONS -D_POSIX)
endif()
if( CMAKE_C_COMPILER_ID MATCHES "MSVC")