# cmake/toolchain-linux.cmake
# 交叉编译 → Linux (x86_64)
# 需要安装 Linux 交叉编译器：
#   Ubuntu/Debian: apt install gcc-x86-64-linux-gnu g++-x86-64-linux-gnu
#   macOS:         brew install x86_64-elf-gcc

set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR x86_64)

set(CMAKE_C_COMPILER   x86_64-linux-gnu-gcc)
set(CMAKE_CXX_COMPILER x86_64-linux-gnu-g++)
set(CMAKE_Fortran_COMPILER x86_64-linux-gnu-gfortran)

set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
