diff --git a/BoostDetectToolset.cmake b/BoostDetectToolset.cmake index 4ce9f8d..1e340e2 100644 --- a/BoostDetectToolset.cmake +++ b/BoostDetectToolset.cmake @@ -2,6 +2,9 @@ # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) +if(NOT CMAKE_CXX_COMPILER_VERSION) + message(FATAL_ERROR: "CMAKE_CXX_COMPILER_VERSION is not set!") +endif() string(REGEX MATCHALL "[0-9]+" _BOOST_COMPILER_VERSION ${CMAKE_CXX_COMPILER_VERSION}) list(GET _BOOST_COMPILER_VERSION 0 _BOOST_COMPILER_VERSION_MAJOR)