common_options.cmake 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #
  2. # Options common for the Serenity (target) and Lagom (host) builds
  3. #
  4. # Make relative paths in depfiles be relative to CMAKE_CURRENT_BINARY_DIR rather than to CMAKE_BINARY_DIR
  5. if (POLICY CMP0116)
  6. cmake_policy(SET CMP0116 NEW)
  7. endif()
  8. # Enable better flags for configuring swift compilation mode
  9. if (POLICY CMP0157)
  10. cmake_policy(SET CMP0157 NEW)
  11. set(CMAKE_Swift_COMPILATION_MODE "$<IF:$<CONFIG:Release>,wholemodule,incremental>")
  12. endif()
  13. serenity_option(ENABLE_COMPILETIME_FORMAT_CHECK ON CACHE BOOL "Enable compiletime format string checks")
  14. serenity_option(ENABLE_UNDEFINED_SANITIZER OFF CACHE BOOL "Enable undefined behavior sanitizer testing in gcc/clang")
  15. serenity_option(UNDEFINED_BEHAVIOR_IS_FATAL OFF CACHE BOOL "Make undefined behavior sanitizer errors non-recoverable")
  16. serenity_option(ENABLE_ALL_THE_DEBUG_MACROS OFF CACHE BOOL "Enable all debug macros to validate they still compile")
  17. serenity_option(ENABLE_ALL_DEBUG_FACILITIES OFF CACHE BOOL "Enable all noisy debug symbols and options. Not recommended for normal developer use")
  18. serenity_option(ENABLE_ADOBE_ICC_PROFILES_DOWNLOAD ON CACHE BOOL "Enable download of Adobe's ICC profiles")
  19. serenity_option(ENABLE_COMPILETIME_HEADER_CHECK OFF CACHE BOOL "Enable compiletime check that each library header compiles stand-alone")
  20. serenity_option(ENABLE_PUBLIC_SUFFIX_DOWNLOAD ON CACHE BOOL "Enable download of the Public Suffix List at build time")
  21. serenity_option(INCLUDE_WASM_SPEC_TESTS OFF CACHE BOOL "Download and include the WebAssembly spec testsuite")
  22. serenity_option(INCLUDE_FLAC_SPEC_TESTS OFF CACHE BOOL "Download and include the FLAC spec testsuite")
  23. serenity_option(ENABLE_CACERT_DOWNLOAD ON CACHE BOOL "Enable download of cacert.pem at build time")
  24. serenity_option(SERENITY_CACHE_DIR "${PROJECT_BINARY_DIR}/../caches" CACHE PATH "Location of shared cache of downloaded files")
  25. serenity_option(ENABLE_NETWORK_DOWNLOADS ON CACHE BOOL "Allow downloads of required files. If OFF, required files must already be present in SERENITY_CACHE_DIR")
  26. serenity_option(ENABLE_CLANG_PLUGINS OFF CACHE BOOL "Enable building with the Clang plugins")
  27. serenity_option(ENABLE_CLANG_PLUGINS_INVALID_FUNCTION_MEMBERS OFF CACHE BOOL "Enable detecting invalid function types as members of GC-allocated objects")
  28. serenity_option(ENABLE_GUI_TARGETS ON CACHE BOOL "Enable building GUI targets")
  29. serenity_option(ENABLE_INSTALL_HEADERS ON CACHE BOOL "Enable installing headers")
  30. serenity_option(ENABLE_SWIFT OFF CACHE BOOL "Enable building Swift files")
  31. if (ENABLE_SWIFT)
  32. include(${CMAKE_CURRENT_LIST_DIR}/Swift/swift-settings.cmake)
  33. endif()