Hide Forgot
Created attachment 813529 [details] Test case Description of problem: This is a problem that occurs when using "config mode" for find_package in a cmake project. If CMAKE_FIND_ROOT_PATH_MODE_PACKAGE is not set to ONLY, then find_package will search outside the mingw sys-root for a <package>Config.cmake file. This occurred on my system that did not have the Qt5Svg package in mingw, but it did exist in my home directory (part of the Qt SDK installation). Then when I tried to find_package(Qt5Svg), cmake found the package in my home directory (when none should have been found since it doesn't exist in mingw). Qt5 uses "config mode" for finding the various components. Note that setting CMAKE_FIND_ROOT_PATH_MODE_LIBRARY and CMAKE_FIND_ROOT_PATH_MODE_INCLUDE are not sufficient in this case, since the Qt5SvgConfig.cmake file does not use find_file or find_library. The attached test case simulates this problem by using find_package in config mode. The package is called "HostOnlyPackage", which will not exist in mingw. So the expected result is that the package should not be found, and a cmake error message is generated if the package is found. Version-Release number of selected component (if applicable): mingw32-filesystem-97-1.fc18.noarch How reproducible: Every time. Steps to Reproduce: 1. Run find-package-test.sh in the attached tarball. Actual results: [snip] HostOnlyPackage include dirs = /home/pnoffke/tmp/mingw-cmake/mingw-cmake-find-package -- Found HostOnlyPackage: /home/pnoffke/tmp/mingw-cmake/mingw-cmake-find-package CMake Error at CMakeLists.txt:10 (MESSAGE): Found HostOnlyPackage in mingw environment. Expected results: [snip] CMake Warning at CMakeLists.txt:7 (find_package): Could not find a package configuration file provided by "HostOnlyPackage" with any of the following names: HostOnlyPackageConfig.cmake hostonlypackage-config.cmake Add the installation prefix of "HostOnlyPackage" to CMAKE_PREFIX_PATH or set "HostOnlyPackage_DIR" to a directory containing one of the above files. If "HostOnlyPackage" provides a separate development package or SDK, be sure it has been installed. Didn't find HostOnlyPackage -- this is good! [snip -- successful compilation of hello] Additional info: Add the following line to each of /usr/share/mingw/Toolchain-mingw32.cmake and /usr/share/mingw/Toolchain-mingw64.cmake fixes the problem: SET(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
This message is a reminder that Fedora 18 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 18. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '18'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 18's end of life. Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 18 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior to Fedora 18's end of life. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
This message is a notice that Fedora 19 is now at end of life. Fedora has stopped maintaining and issuing updates for Fedora 19. It is Fedora's policy to close all bug reports from releases that are no longer maintained. Approximately 4 (four) weeks from now this bug will be closed as EOL if it remains open with a Fedora 'version' of '19'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 19 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
This message is a reminder that Fedora 20 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 20. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '20'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 20 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.