message("PRELOADING cache")
set(CMAKE_C_STANDARD 23 CACHE STRING "preload")
set(CMAKE_C_FLAGS "-Wno-pre-c23-compat" CACHE STRING "preload")
set(CMAKE_VERBOSE_MAKEFILE ON CACHE BOOL "preload")
set(WITH_SERVER ON CACHE BOOL "qa default")
set(WITH_SAMPLE ON CACHE BOOL "qa default")
set(WITH_SIMD ON CACHE BOOL "qa default")
set(WITH_OPAQUE_SETTINGS ON CACHE BOOL "qa default")
set(WITH_STREAMPOOL_DEBUG ON CACHE BOOL "preload")
set(WITH_VERBOSE_WINPR_ASSERT OFF CACHE BOOL "qa default")
set(ENABLE_WARNING_VERBOSE ON CACHE BOOL "preload")
set(BUILD_SHARED_LIBS OFF CACHE BOOL "qa default")
set(CHANNEL_RDPECAM ON CACHE BOOL "qa default")
set(CHANNEL_RDPECAM_CLIENT ON CACHE BOOL "qa default")
set(CHANNEL_RDPEAR ON CACHE BOOL "qa default")
set(CHANNEL_RDPEAR_CLIENT ON CACHE BOOL "qa default")
set(CHANNEL_GFXREDIR ON CACHE BOOL "qa default")
set(CHANNEL_RDP2TCP ON CACHE BOOL "qa default")
set(CHANNEL_SSHAGENT ON CACHE BOOL "qa default")

set(BUILD_WITH_CLANG_TIDY OFF CACHE BOOL "qa default")

include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/ClangDetectTool.cmake)
clang_detect_tool(CLANG_EXE clang REQUIRED)
clang_detect_tool(CLANG_XX_EXE clang++ REQUIRED)

set(CMAKE_C_COMPILER "${CLANG_EXE}" CACHE STRING "qa default")
set(CMAKE_CXX_COMPILER "${CLANG_XX_EXE}" CACHE STRING "qa default")
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++" CACHE STRING "qa-default")
