summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-03-03 23:29:37 +0100
committerAndreas Kling <kling@serenityos.org>2021-03-04 11:21:55 +0100
commit15ae22f7ccfc1401db133854023a5b259f8aae46 (patch)
tree06c729be9e19023c0ae2bc1879d2253030e93a41 /CMakeLists.txt
parente59a6315111cdbe6d44e285ffc38e9e823d058ee (diff)
downloadserenity-15ae22f7ccfc1401db133854023a5b259f8aae46.zip
Build: Add ENABLE_PCI_IDS_DOWNLOAD CMake option
This allows disabling the download of the pci.ids database at build time. Addresses concerns raised in #5410.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d969c02899..1b5ce42c1f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,7 +23,8 @@ option(ENABLE_MEMORY_SANITIZER "Enable memory sanitizer testing in gcc/clang" OF
option(ENABLE_UNDEFINED_SANITIZER "Enable undefined behavior sanitizer testing in gcc/clang" OFF)
option(ENABLE_FUZZER_SANITIZER "Enable fuzzer sanitizer testing in clang" OFF)
option(ENABLE_ALL_THE_DEBUG_MACROS "Enable all debug macros to validate they still compile" OFF)
-option(ENABLE_COMPILETIME_FORMAT_CHECK "Disable compiletime format string checks" ON)
+option(ENABLE_COMPILETIME_FORMAT_CHECK "Enable compiletime format string checks" ON)
+option(ENABLE_PCI_IDS_DOWNLOAD "Enable download of the pci.ids database at build time" ON)
option(BUILD_LAGOM "Build parts of the system targeting the host OS for fuzzing/testing" OFF)
add_custom_target(run
@@ -185,7 +186,7 @@ add_subdirectory(Userland)
set(PCI_IDS_URL https://pci-ids.ucw.cz/v2.2/pci.ids)
set(PCI_IDS_PATH ${CMAKE_INSTALL_DATAROOTDIR}/pci.ids)
-if(NOT EXISTS ${PCI_IDS_PATH})
+if(ENABLE_PCI_IDS_DOWNLOAD AND NOT EXISTS ${PCI_IDS_PATH})
message(STATUS "Downloading PCI ID database from ${PCI_IDS_URL}...")
file(DOWNLOAD ${PCI_IDS_URL} ${PCI_IDS_PATH} INACTIVITY_TIMEOUT 10)
endif()