FindBoost: Clarify failure on missing 'static' libs (#14235)

When Boost_USE_STATIC_LIBS is ON we may complain that Boost libraries
cannot be found even when shared libraries are present.  Update the
error message to tell the user explicitly that we want static libraries.

Suggested-by: Laurence R. McGlashan <laurence.mcglashan@gmail.com>
This commit is contained in:
Brad King 2013-06-20 17:05:00 -04:00
parent 7c61c73fbc
commit 86cbd7312a
1 changed files with 6 additions and 1 deletions

View File

@ -1020,7 +1020,12 @@ if(Boost_FOUND)
# We were unable to find some libraries, so generate a sensible
# error message that lists the libraries we were unable to find.
set(Boost_ERROR_REASON
"${Boost_ERROR_REASON}\nThe following Boost libraries could not be found:\n")
"${Boost_ERROR_REASON}\nCould not find the following")
if(Boost_USE_STATIC_LIBS)
set(Boost_ERROR_REASON "${Boost_ERROR_REASON} static")
endif()
set(Boost_ERROR_REASON
"${Boost_ERROR_REASON} Boost libraries:\n")
foreach(COMPONENT ${_Boost_MISSING_COMPONENTS})
set(Boost_ERROR_REASON
"${Boost_ERROR_REASON} boost_${COMPONENT}\n")