]> granicus.if.org Git - libexpat/commitdiff
CMake: Option to Disable the usuage of getrandom after autodetect
authorkkkunche <kishore.kunche@intel.com>
Mon, 8 Jul 2019 10:39:17 +0000 (16:09 +0530)
committerSebastian Pipping <sebastian@pipping.org>
Tue, 9 Jul 2019 21:13:23 +0000 (23:13 +0200)
expat/CMakeLists.txt

index 69bd4bdecb4f5fb7de858e7515e620dd337e6348..3515d2ac39363a78e4ed5d18d3acab66250a03d5 100644 (file)
@@ -58,6 +58,12 @@ if(NOT WIN32)
         set(XML_DEV_URANDOM 0)\r
     endif(XML_DEV_URANDOM)\r
 endif()\r
+if (NOT WIN32)\r
+    option(AUTODETECT_GETRANDOM "Define to bypass auto-detection of getrandom function" ON)\r
+    if(NOT AUTODETECT_GETRANDOM)\r
+        set(HAVE_GETRANDOM 0)\r
+    endif()\r
+endif()\r
 option(XML_UNICODE "Use UTF-16 encoded chars (two bytes) instead of UTF-8" OFF)\r
 option(XML_UNICODE_WCHAR_T "Use wchar_t to represent UTF-16 instead of unsigned short" OFF)\r
 option(XML_ATTR_INFO "Define to allow retrieving the byte offsets for attribute names and values" OFF)\r