summaryrefslogtreecommitdiffstats
path: root/Modules/FindBoost.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-06-20 21:05:00 (GMT)
committerBrad King <brad.king@kitware.com>2013-06-20 21:10:13 (GMT)
commit86cbd7312a766485eb26219c197b78ae079d44a3 (patch)
treefaca8ef3c48c55e2f0b52110d5e5734027dd7984 /Modules/FindBoost.cmake
parent7c61c73fbc1c508a6622b444e06c7fc9a0c280f1 (diff)
downloadCMake-86cbd7312a766485eb26219c197b78ae079d44a3.zip
CMake-86cbd7312a766485eb26219c197b78ae079d44a3.tar.gz
CMake-86cbd7312a766485eb26219c197b78ae079d44a3.tar.bz2
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>
Diffstat (limited to 'Modules/FindBoost.cmake')
-rw-r--r--Modules/FindBoost.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index d1ce2f4..4cc32be 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")