find_package fails but reports success with case in sensitive filesystems
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
When using find_package
(i.e. boost) on the mac, you can have a situation where you use (note the package case):
find_package(boost COMPONENTS thread)
And do not get a failure, because the FindBoost.cmake
file has been run, because of the insensitivity of filename reads of the mac filesystem. However, this file expects it's variables to all be set in the form ${Boost_FIND_COMPONENTS}
- but the differently cased ${boost_FIND_COMPONENTS}
are the ones passed through.
The outcome is that the package is incorrectly configured, but no warnings or errors are reported. I would have at least expected a warning, because I can't imagine this behaviour ever being desired.
On Mac, CMakeList.txt:
find_package(boost 1.34 COMPONENTS thread )
message("Boost_LIBRARIES: " ${Boost_LIBRARIES})