[cmake] make C and C++ standards configurable

use cache variables to allow overriding them from command line
This commit is contained in:
akallabeth
2025-02-13 12:50:36 +01:00
parent b85737e0b8
commit a24ffe957c
12 changed files with 19 additions and 37 deletions

View File

@@ -25,10 +25,6 @@ if(POLICY CMP0091)
endif()
project(FreeRDP LANGUAGES C)
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS ON)
add_custom_target(fuzzers COMMENT "Build fuzzers")
if(NOT DEFINED VENDOR)
@@ -60,6 +56,8 @@ endif()
# Include our extra modules
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/)
include(ProjectCStandard)
# Check for cmake compatibility (enable/disable features)
include(CheckCmakeCompat)