From 57f8b37a42f9bf2425bb4f80d744cd5e140f0eec Mon Sep 17 00:00:00 2001 From: taynpg Date: Mon, 4 Nov 2024 21:44:05 +0800 Subject: [PATCH] only change. --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bedd0a6..1ecbe6e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +23,9 @@ set(SOURCES_FILE ) # 默认可以从环境中获取boost -cmake_policy(SET CMP0167 NEW) +if (${CMAKE_VERSION} VERSION_GREATER "3.30") + cmake_policy(SET CMP0167 NEW) +endif() set(Boost_USE_STATIC_LIBS OFF) find_package(Boost REQUIRED program_options filesystem) include_directories(${Boost_INCLUDE_DIR})