From c3efad292c48ee11d5605b3c742121aabb1b5f03 Mon Sep 17 00:00:00 2001 From: Tian jianyong <11429339@qq.com> Date: Fri, 9 May 2025 16:19:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20CMakeLists.txt=EF=BC=8C?= =?UTF-8?q?=E8=AE=A9=20Centos=20=E4=BD=BF=E7=94=A8=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E7=9A=84=E7=BC=96=E8=AF=91=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) 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) # 保留必要的包根目录策略