Skip to content

Commit

Permalink
[cmake] Remove error in Findcxxopt (#4554)
Browse files Browse the repository at this point in the history
Remove error and send warning when cxxopt is found but version mismatch
  • Loading branch information
bakpaul committed Mar 6, 2024
1 parent 7255188 commit d0a4639
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sofa/framework/Config/cmake/Modules/Findcxxopts.cmake
Expand Up @@ -28,12 +28,12 @@ macro(_cxxopts_check_version)
set(cxxopts_VERSION_OK TRUE)
if(${cxxopts_VERSION} VERSION_LESS ${cxxopts_FIND_VERSION})
set(cxxopts_VERSION_OK FALSE)
message(SEND_ERROR "cxxopts version ${cxxopts_VERSION} found in ${cxxopts_INCLUDE_DIR}/cxxopts.hpp, "
message(WARNING "cxxopts version ${cxxopts_VERSION} found in ${cxxopts_INCLUDE_DIR}/cxxopts.hpp, "
"but at least version ${cxxopts_FIND_VERSION} is required")
endif()
if(${cxxopts_FIND_VERSION_EXACT} AND NOT ${cxxopts_VERSION} VERSION_EQUAL ${cxxopts_FIND_VERSION})
set(cxxopts_VERSION_OK FALSE)
message(SEND_ERROR "cxxopts version ${cxxopts_VERSION} found in ${cxxopts_INCLUDE_DIR}, "
message(WARNING "cxxopts version ${cxxopts_VERSION} found in ${cxxopts_INCLUDE_DIR}, "
"but exact version ${cxxopts_FIND_VERSION_EXACT} is required")
endif()
endmacro()
Expand Down

0 comments on commit d0a4639

Please sign in to comment.