summaryrefslogtreecommitdiff
path: root/Meta/Lagom/CMakeLists.txt
diff options
context:
space:
mode:
authorAndrew Kaster <akaster@serenityos.org>2021-09-07 02:08:54 -0600
committerAli Mohammad Pur <Ali.mpfard@gmail.com>2021-09-15 19:04:52 +0430
commit904a268872416dc9b9f26c83fd0b1bd8b715c511 (patch)
tree858f85327337c91740ba861cb4dafa4d432a7822 /Meta/Lagom/CMakeLists.txt
parent6e7cc40b18dae594a9b0344a8dda692fa4d81343 (diff)
downloadserenity-904a268872416dc9b9f26c83fd0b1bd8b715c511.zip
Meta: Move all options to targetname_options.cmake files
This common strategy of having a serenity_option() macro defined in either the Lagom or top level CMakeLists.txt allows us to do two things: First, we can more clearly see which options are Serenity-specific, Lagom-specific, or common between the target and host builds. Second, it enables the upcoming SuperBuild changes to set() the options in the SuperBuild's CMake cache and forward each target's options to the corresponding ExternalProject.
Diffstat (limited to 'Meta/Lagom/CMakeLists.txt')
-rw-r--r--Meta/Lagom/CMakeLists.txt9
1 files changed, 8 insertions, 1 deletions
diff --git a/Meta/Lagom/CMakeLists.txt b/Meta/Lagom/CMakeLists.txt
index f35a5d908c..69fcdd6a5c 100644
--- a/Meta/Lagom/CMakeLists.txt
+++ b/Meta/Lagom/CMakeLists.txt
@@ -8,7 +8,6 @@ project(
LANGUAGES C CXX
)
-option(ENABLE_LAGOM_CCACHE "Enable ccache for Lagom builds" OFF)
option(BUILD_SHARED_LIBS "Build shared libraries instead of static libraries" ON)
if (ENABLE_OSS_FUZZ)
set(BUILD_SHARED_LIBS OFF) # Don't use shared libraries on oss-fuzz, for ease of integration with their infrastructure
@@ -26,6 +25,14 @@ get_filename_component(
list(APPEND CMAKE_MODULE_PATH "${SERENITY_PROJECT_ROOT}/Meta/CMake")
+if(NOT COMMAND serenity_option)
+ macro(serenity_option)
+ set(${ARGV})
+ endmacro()
+endif()
+
+include(lagom_options)
+
find_package(Threads REQUIRED)
if (ENABLE_LAGOM_CCACHE)