aboutsummaryrefslogtreecommitdiff
path: root/cmake/BuildTools.cmake
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-14 09:21:29 +0000
committer_ov4 <ov4@ov4.org>2026-10-14 09:21:29 +0000
commit83c5d8ecbf019a4f3cea6874566a5631764d3d9b (patch)
tree8b6d30fb8e22d5cbaa45ecccdc68efe1ac8ead2b /cmake/BuildTools.cmake
parenta2ba22397598d558e83725283495de3cf37e68d6 (diff)
build(toolchain)!: require LLVM and Clang 23
Reject other compiler and LLVM major versions and remove GCC compiler fallbacks. Adapt string globals, block termination checks and the embedded target triple to LLVM 23 without changing pseudocode behavior. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Diffstat (limited to 'cmake/BuildTools.cmake')
-rw-r--r--cmake/BuildTools.cmake15
1 files changed, 10 insertions, 5 deletions
diff --git a/cmake/BuildTools.cmake b/cmake/BuildTools.cmake
index d6928bb..e2d3e2f 100644
--- a/cmake/BuildTools.cmake
+++ b/cmake/BuildTools.cmake
@@ -2,15 +2,20 @@
if(CMAKE_GENERATOR MATCHES "Makefiles|Ninja")
foreach(language C CXX)
if(language STREQUAL "C")
- set(names clang cc gcc)
+ set(names clang-23 clang)
+ set(compiler_environment CC)
else()
- set(names clang++ c++ g++)
+ set(names clang++-23 clang++)
+ set(compiler_environment CXX)
endif()
if(CMAKE_${language}_COMPILER)
- get_filename_component(requested "${CMAKE_${language}_COMPILER}" NAME)
- list(INSERT names 0 "${requested}")
+ if(NOT IS_ABSOLUTE "${CMAKE_${language}_COMPILER}")
+ cpsc_find_dependency(PROGRAM CMAKE_${language}_COMPILER
+ NAMES "${CMAKE_${language}_COMPILER}" REQUIRED)
+ endif()
+ elseif("$ENV{${compiler_environment}}" STREQUAL "")
+ cpsc_find_dependency(PROGRAM CMAKE_${language}_COMPILER NAMES ${names} REQUIRED)
endif()
- cpsc_find_dependency(PROGRAM CMAKE_${language}_COMPILER NAMES ${names} REQUIRED)
# project() would otherwise restore the previous path from this file.
set(compiler_info "${CMAKE_BINARY_DIR}/CMakeFiles/${CMAKE_VERSION}/CMake${language}Compiler.cmake")
if(EXISTS "${compiler_info}")