修改 CMakeLists.txt,让 Centos 使用默认的编译器
This commit is contained in:
parent
faf4f64aec
commit
c3efad292c
@ -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) # 保留必要的包根目录策略
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user