From 86cbd7312a766485eb26219c197b78ae079d44a3 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 20 Jun 2013 17:05:00 -0400 Subject: [PATCH] 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 --- Modules/FindBoost.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index d1ce2f41b..4cc32be28 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -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")