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})