Files

23 lines
617 B
CMake
Raw Permalink Normal View History

2026-08-12 13:47:50 +03:00
# GCC 16 toolchain for C++26 and contracts.
find_program(
COURSE_GCC16_C
NAMES gcc-16
HINTS /opt/homebrew/bin /usr/local/bin /opt/local/bin
)
find_program(
COURSE_GCC16_CXX
NAMES g++-16
HINTS /opt/homebrew/bin /usr/local/bin /opt/local/bin
)
if(NOT COURSE_GCC16_CXX)
message(
FATAL_ERROR
"g++-16 not found. Install GCC 16, e.g. 'brew install gcc@16', "
"then ensure g++-16 is on your PATH."
)
endif()
set(CMAKE_C_COMPILER "${COURSE_GCC16_C}" CACHE FILEPATH "C compiler" FORCE)
set(CMAKE_CXX_COMPILER "${COURSE_GCC16_CXX}" CACHE FILEPATH "C++ compiler" FORCE)