summaryrefslogtreecommitdiffstats
path: root/Modules/FindBoost.cmake
diff options
context:
space:
mode:
authorPhilip Lowman <philip@yhbt.com>2011-06-10 03:20:18 (GMT)
committerPhilip Lowman <philip@yhbt.com>2011-06-10 03:20:18 (GMT)
commitf26d1cf1540583deaffcd141796304645673d56b (patch)
tree1ba58b22d1a687a745b6fc4a3f09701d476982e0 /Modules/FindBoost.cmake
parent9ccefd55c5db49a0ddb518a7d1a2986def1ec55e (diff)
downloadCMake-f26d1cf1540583deaffcd141796304645673d56b.zip
CMake-f26d1cf1540583deaffcd141796304645673d56b.tar.gz
CMake-f26d1cf1540583deaffcd141796304645673d56b.tar.bz2
FindBoost: Fixes #12188
Workaround an issue where users wanted to use Boost_LIBRARIES with the install() command and debug/optimized keywords were interfering. Now debug/optimized keywords are removed if the release & debug library are the same.
Diffstat (limited to 'Modules/FindBoost.cmake')
-rw-r--r--Modules/FindBoost.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index f17e599..348f658 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -281,6 +281,12 @@ macro(_Boost_ADJUST_LIB_VARS basename)
set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_DEBUG})
set(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_DEBUG})
endif()
+
+ # If the debug & release library ends up being the same, omit the keywords
+ if(${Boost_${basename}_LIBRARY_RELEASE} STREQUAL ${Boost_${basename}_LIBRARY_DEBUG})
+ set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE} )
+ set(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_RELEASE} )
+ endif()
if(Boost_${basename}_LIBRARY)
set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY} CACHE FILEPATH "The Boost ${basename} library")