Browse Source

cmake: do all compile tests with -D_GNU_SOURCE=1

Anonymous Maarten 2 years ago
parent
commit
460b7b247f
1 changed files with 2 additions and 0 deletions
  1. 2 0
      CMakeLists.txt

+ 2 - 0
CMakeLists.txt

@@ -289,6 +289,8 @@ if(WINDOWS)
   set(CMAKE_SHARED_LIBRARY_PREFIX "")
 endif()
 
+set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -D_GNU_SOURCE=1")
+
 # Emscripten toolchain has a nonempty default value for this, and the checks
 # in this file need to change that, so remember the original value, and
 # restore back to that afterwards. For check_function_exists() to work in