mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 15:10:19 +00:00
CMake: Enable policy 0157 for more control over Swift compile mode
This commit is contained in:
parent
68ce5f8290
commit
922c6bde87
Notes:
github-actions[bot]
2024-07-21 21:56:37 +00:00
Author: https://github.com/ADKaster Commit: https://github.com/LadybirdBrowser/ladybird/commit/922c6bde875 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/726
2 changed files with 7 additions and 1 deletions
|
@ -30,8 +30,8 @@ list(APPEND CMAKE_MODULE_PATH "${LADYBIRD_SOURCE_DIR}/Meta/CMake")
|
|||
|
||||
include(Ladybird/cmake/EnableLagom.cmake)
|
||||
include(use_linker)
|
||||
include(lagom_options NO_POLICY_SCOPE)
|
||||
include(lagom_compile_options)
|
||||
include(lagom_install_options)
|
||||
|
||||
if (ENABLE_ADDRESS_SANITIZER)
|
||||
add_cxx_compile_options(-fsanitize=address -fno-omit-frame-pointer)
|
||||
|
|
|
@ -7,6 +7,12 @@ if (POLICY CMP0116)
|
|||
cmake_policy(SET CMP0116 NEW)
|
||||
endif()
|
||||
|
||||
# Enable better flags for configuring swift compilation mode
|
||||
if (POLICY CMP0157)
|
||||
cmake_policy(SET CMP0157 NEW)
|
||||
set(CMAKE_Swift_COMPILATION_MODE "$<IF:$<CONFIG:Release>,wholemodule,incremental>")
|
||||
endif()
|
||||
|
||||
serenity_option(ENABLE_COMPILETIME_FORMAT_CHECK ON CACHE BOOL "Enable compiletime format string checks")
|
||||
serenity_option(ENABLE_UNDEFINED_SANITIZER OFF CACHE BOOL "Enable undefined behavior sanitizer testing in gcc/clang")
|
||||
serenity_option(UNDEFINED_BEHAVIOR_IS_FATAL OFF CACHE BOOL "Make undefined behavior sanitizer errors non-recoverable")
|
||||
|
|
Loading…
Reference in a new issue