mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
Tests/FindImageMagick: Tolerate pre-release versions
The version installed from the system in our new Fedora 44 CI base image has a beta version of ImageMagick installed, which the FindImageMagick module can't parse.
This commit is contained in:
@@ -11,6 +11,14 @@ int main()
|
||||
std::string found_version =
|
||||
std::string(MagickLibVersionText) + MagickLibAddendum;
|
||||
|
||||
// Pre-release builds append an annotation such as " (Beta)" to
|
||||
// MagickLibAddendum which FindImageMagick's ImageMagick_VERSION does not
|
||||
// include.
|
||||
std::string::size_type annotation = found_version.find(" (");
|
||||
if (annotation != std::string::npos) {
|
||||
found_version.erase(annotation);
|
||||
}
|
||||
|
||||
std::cout << "Found ImageMagick version " << found_version
|
||||
<< ", expected version " << CMAKE_EXPECTED_IMAGEMAGICK_VERSION
|
||||
<< "\n";
|
||||
|
||||
Reference in New Issue
Block a user