From 20bb6ed0b3da729d173466b950616ee761822155 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Fri, 30 Aug 2019 21:18:19 +0200 Subject: [PATCH] CMake: Rename USE_libbsd to EXPAT_WITH_LIBBSD --- expat/CMakeLists.txt | 10 +++++----- expat/ConfigureChecks.cmake | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt index ec6a7363..39129f8c 100644 --- a/expat/CMakeLists.txt +++ b/expat/CMakeLists.txt @@ -47,7 +47,7 @@ option(EXPAT_BUILD_TESTS "build the tests for expat library" ON) option(BUILD_shared "build a shared expat library" ON) option(EXPAT_BUILD_DOCS "build man page for xmlwf" ${_EXPAT_BUILD_DOCS_DEFAULT}) option(EXPAT_BUILD_FUZZERS "build fuzzers for the expat library" OFF) -option(USE_libbsd "utilize libbsd (for arc4random_buf)" OFF) +option(EXPAT_WITH_LIBBSD "utilize libbsd (for arc4random_buf)" OFF) option(INSTALL "install expat files in cmake install target" ON) set(XML_CONTEXT_BYTES 1024 CACHE STRING "Define to specify how much context to retain around the current parse point") option(XML_DTD "Define to make parameter entity parsing functionality available" ON) @@ -72,10 +72,10 @@ endif() # # Environment checks # -if(USE_libbsd) +if(EXPAT_WITH_LIBBSD) find_library(LIB_BSD NAMES bsd) if(NOT LIB_BSD) - message(SEND_ERROR "USE_libbsd option is enabled, but libbsd was not found") + message(SEND_ERROR "EXPAT_WITH_LIBBSD option is enabled, but libbsd was not found") else() set(HAVE_LIBBSD TRUE) endif() @@ -243,7 +243,7 @@ else(BUILD_shared) endif(BUILD_shared) add_library(expat ${_SHARED} ${expat_SRCS}) -if(USE_libbsd) +if(EXPAT_WITH_LIBBSD) target_link_libraries(expat ${LIB_BSD}) endif() @@ -467,7 +467,7 @@ if(WIN32) else() message(STATUS " getrandom ................ ${HAVE_GETRANDOM}") message(STATUS " syscall SYS_getrandom .... ${HAVE_SYSCALL_GETRANDOM}") - message(STATUS " libbsd ................... ${USE_libbsd}") + message(STATUS " libbsd ................... ${EXPAT_WITH_LIBBSD}") message(STATUS " /dev/random .............. ${XML_DEV_URANDOM}") endif() message(STATUS "") diff --git a/expat/ConfigureChecks.cmake b/expat/ConfigureChecks.cmake index 4936f67f..d85e48c9 100644 --- a/expat/ConfigureChecks.cmake +++ b/expat/ConfigureChecks.cmake @@ -21,7 +21,7 @@ check_symbol_exists("getpagesize" "unistd.h" HAVE_GETPAGESIZE) check_symbol_exists("mmap" "sys/mman.h" HAVE_MMAP) check_symbol_exists("getrandom" "sys/random.h" HAVE_GETRANDOM) -if(USE_libbsd) +if(EXPAT_WITH_LIBBSD) set(CMAKE_REQUIRED_LIBRARIES "${LIB_BSD}") set(_bsd "bsd/") else()