Skip to content

Commit

Permalink
Add cmake version check for conan 2
Browse files Browse the repository at this point in the history
  • Loading branch information
FeignClaims committed Feb 23, 2024
1 parent 387ecff commit 7b1a743
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Conan.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,13 @@ macro(run_conan2)
)
cmake_parse_arguments(_args "${options}" "${one_value_args}" "${multi_value_args}" ${ARGN})

conan_get_version(_conan_current_version)
if(CMAKE_VERSION VERSION_LESS "3.24.0")
message(FATAL_ERROR
"run_conan2 only supports cmake 3.24+, please update your cmake.\n"
" If you're using conan 1, set ENABLE_CONAN using project_options(...) or dynamic_project_options(...) after project().")
endif()

conan_get_version(_conan_current_version)
if(_conan_current_version VERSION_LESS "2.0.5")
message(FATAL_ERROR
"run_conan2 only supports conan 2.0.5+, please update your conan.\n"
Expand Down

0 comments on commit 7b1a743

Please sign in to comment.