FindBoost.cmake weird warning about Boost_version even when not found.
Using this approach to find boost:
set( Boost_USE_MULTITHREADED ON )
set( Boost_USE_STATIC_LIBS ON )
find_package( Boost COMPONENTS program_options thread )
Will result in a warning message of the form if no boost version is found.
CMake Warning at C:/Program Files (x86)/CMake/share/cmake-3.12/Modules/FindBoost.cmake:577 (message):
Imported targets and dependency information not available for Boost version
(all versions older than 1.33)
Call Stack (most recent call first):
C:/Program Files (x86)/CMake/share/cmake-3.12/Modules/FindBoost.cmake:959 (_Boost_COMPONENT_DEPENDENCIES)
C:/Program Files (x86)/CMake/share/cmake-3.12/Modules/FindBoost.cmake:1618 (_Boost_MISSING_DEPENDENCIES)
[C:/replacement for path to top_file] (find_package)
Could NOT find Boost
This is a really weird error message and stems from the fact that the caller simply does not care about the version that is used. In this case the Boost_VERSION content is empty which means that an if case that compares with version 103300 evaluates to true.FindBoost.cmake
I would expect this error to simply not happen. For example by checking if the version number is empty or not before checking which version it actually is.
For example by inserting line if( NOT ( "${Boost_VERSION}" STREQUAL "" ) )
before line 577 in FindBoost.cmake.
If you agree I will have to go through the whole process of fighting with git to get it to do what I want it to and supply a patch.
Tested this with version 3.10 and 3.12 of cmake. The problem is most likely older.