diff --git a/CMakeLists.txt b/CMakeLists.txt index 503f447c1b..4d8ff41d68 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,7 +66,7 @@ cmake_dependent_option(USE_DIST_PACKAGES_FOR_PYTHON #============================================================================ # Setting this policy enables using the protobuf_MODULE_COMPATIBLE -# set command in CMake versions older than 13.13 +# set command when cmake_minimum_required is less than 3.13 set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) # This option is needed to use the PROTOBUF_GENERATE_CPP # in case protobuf is found with the CMake config files diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7fff867c64..b3c2917657 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -309,7 +309,7 @@ foreach(CMD_TEST # to the PATH. This is done via the ENVIRONMENT_MODIFICATION that is only available # since CMake 3.22. However, if an older CMake is used another trick to install the libraries # beforehand - if (WIN32 AND CMAKE_VERSION STRGREATER "3.22") + if (WIN32 AND ${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.22") set_tests_properties(${CMD_TEST} PROPERTIES ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}") endif()