Hello, > > I've got a question about some logic in > CMake's find_package_handle_standard_args function, specifically the fact > that it considers a nonexistent / empty string version to be a version that > acceptably matches the required version. > > The logic is: > * call find_package_handle_standard_args(... VERSION_VAR "" ...) > * at > FindPackageHandleStandardArgs.cmake:286<http://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/FindPackageHandleStandardArgs.cmake;hb=HEAD#l286>, > the VERSION_OK variable is set to a default value of TRUE > * at 287, the value of the argument following VERSION_VAR is set into > VERSION > * at 309, if VERSION is undefined or an empty string, the else() branch is > taken > * from 309-318, an error message is set, but VERSION_OK is never made FALSE > * at 325, since VERSION_OK is still TRUE, the logic proceeds with setting > ${package_name}_FOUND to TRUE > > Is this the intended behavior (and if so, why?) or a bug? > > Thanks, > Brian > > -- > Brian Helba > Medical Imaging > Kitware, Inc. >
-- Brian Helba Medical Imaging Kitware, Inc.
-- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
