summaryrefslogtreecommitdiffstats
path: root/Modules/FindBoost.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-05-04 14:49:18 (GMT)
committerBrad King <brad.king@kitware.com>2020-05-04 18:05:40 (GMT)
commita1e04be913078e2733cde350550665a1dc328dcd (patch)
tree1b2d162cc49b8bb95b0f5d1f89d6045182fa5291 /Modules/FindBoost.cmake
parent615129f3ebd308abeaaee7f5f0689e7fc4616c28 (diff)
downloadCMake-a1e04be913078e2733cde350550665a1dc328dcd.zip
CMake-a1e04be913078e2733cde350550665a1dc328dcd.tar.gz
CMake-a1e04be913078e2733cde350550665a1dc328dcd.tar.bz2
FindBoost: Update MinGW compiler tag for Boost 1.73
Boost 1.73 on MinGW no longer uses the compiler minor version in its library names if the major version is at least 5. Fixes: #20673
Diffstat (limited to 'Modules/FindBoost.cmake')
-rw-r--r--Modules/FindBoost.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index 53fc4b7..30b55c3 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -750,7 +750,11 @@ function(_Boost_GUESS_COMPILER_PREFIX _ret)
set(_boost_COMPILER "-mgw") # no GCC version encoding prior to 1.34
else()
_Boost_COMPILER_DUMPVERSION(_boost_COMPILER_VERSION _boost_COMPILER_VERSION_MAJOR _boost_COMPILER_VERSION_MINOR)
- set(_boost_COMPILER "-mgw${_boost_COMPILER_VERSION}")
+ if(Boost_VERSION_STRING VERSION_GREATER_EQUAL 1.73 AND _boost_COMPILER_VERSION_MAJOR VERSION_GREATER_EQUAL 5)
+ set(_boost_COMPILER "-mgw${_boost_COMPILER_VERSION_MAJOR}")
+ else()
+ set(_boost_COMPILER "-mgw${_boost_COMPILER_VERSION}")
+ endif()
endif()
elseif (UNIX)
_Boost_COMPILER_DUMPVERSION(_boost_COMPILER_VERSION _boost_COMPILER_VERSION_MAJOR _boost_COMPILER_VERSION_MINOR)