diff --git a/CMakeLists.txt b/CMakeLists.txt index 30e9096..d14e4ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,11 @@ cmake_minimum_required(VERSION 3.14...3.27) +# 设置编译器 +if(NOT APPLE) + set(CMAKE_C_COMPILER "/usr/bin/gcc") + set(CMAKE_CXX_COMPILER "/usr/bin/g++") +endif() + # 设置 CMake 策略(移除非必要的新策略) cmake_policy(SET CMP0074 NEW) # 保留必要的包根目录策略