CMake: Enforce minimum toolset versions

This commit is contained in:
Joshua Vandaële
2026-07-14 16:37:31 +02:00
parent f98c974a0d
commit 13238340ae
2 changed files with 30 additions and 15 deletions
+10
View File
@@ -138,3 +138,13 @@ function(dolphin_find_optional_system_library_pkgconfig library search alias bun
dolphin_add_bundled_library(${library} ${use_system} ${bundled_path})
endif()
endfunction()
function(dolphin_check_toolset_version LABEL VERSION_VAR MIN_VERSION)
if(NOT DEFINED ${VERSION_VAR})
return()
endif()
message(STATUS "Using ${LABEL} ${${VERSION_VAR}}")
if(${VERSION_VAR} VERSION_LESS ${MIN_VERSION})
message(FATAL_ERROR "Requires ${LABEL} ${MIN_VERSION} or higher")
endif()
endfunction()