mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
CMake: Enable policy 0157 for more control over Swift compile mode
This commit is contained in:
parent
68ce5f8290
commit
922c6bde87
|
|
@ -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 New Issue
Block a user