> On Thursday 16 February 2012, Alexander Neundorf wrote: >> Hi, >> >> when I use a Find-module to search for a package, I get a nice error >> message if the package could not be found. > > I collected the various error messages which can be produced in the > different > cases: > * package not found > * package found, but version doesn't match > > * REQUIRED > * without REQUIRED > > * find_package() with no Find-module present > * find_package(NO_MODULE) > * find_package() with a wrapper Find-module which does: > find_package(ecm QUIET NO_MODULE) > fphsa(ecm CONFIG_MODE) > > > Here we go: > > package not found, REQUIRED: > > -------------------------------------------------------- > 1.) find_package() with no Find-module present: > > CMake Error at CMakeLists.txt:4 (find_package): > Could not find module Findecm.cmake or a configuration file > for package ecm. > > Adjust CMAKE_MODULE_PATH to find Findecm.cmake or set > ecm_DIR to the directory containing a CMake configuration > file for ecm. The file will have one of the following > names: > > ecmConfig.cmake > ecm-config.cmake > ***** processing continues, but with error > > > -------------------------------------------------------- > 2.) find_package(NO_MODULE): > > CMake Error at CMakeLists.txt:4 (find_package): > Could not find a configuration file for package ecm. > > Set ecm_DIR to the directory containing a CMake > configuration file for ecm. The file will have one of the > following names: > > ecmConfig.cmake > ecm-config.cmake > ***** processing continues, but with error
> -------------------------------------------------------- > 4.) find_package() with no Find-module present, same with NO_MODULE: > > CMake Error at CMakeLists.txt:4 (find_package): > Could not find a configuration file for package "ecm" that > is compatible with requested version "0.0.4". > > The following configuration files were considered but not accepted: > > /opt/ecm/share/ecm-0.0.2/cmake/ecm-config.cmake, version: 0.0.2 > /opt/ecm/share/ecm-0.0.3/cmake/ecm-config.cmake, version: 0.0.3 > ***** processing continues, but with error > What should be improved: > 1.), 2.), 4.) processing should stop if REQUIRED was used I disagree. Say I want to build $random package. Throw the source somewhere, run cmake. Now I see the errors and install the packages that are missing. If processing immediately stops on an unmet dependency I would have to repeat that as long as there are unmet dependencies. If processing continues but gives and error I can install all things at once. Eike -- 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
