diff options
author | David Cole <david.cole@kitware.com> | 2012-08-20 19:42:34 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2012-08-20 19:42:34 (GMT) |
commit | c79dd4d951eec397692dd4af18e6a85b25a4f4ef (patch) | |
tree | 8e7cbfd9c44e410b216b18fecf331c8d50cfa922 /Modules/FindBoost.cmake | |
parent | 19e210af90d943548e7f07759030a2dd2cc8a2a4 (diff) | |
parent | 4be6783711b2ff510c3449c5de22d35663d8bfc1 (diff) | |
download | CMake-c79dd4d951eec397692dd4af18e6a85b25a4f4ef.zip CMake-c79dd4d951eec397692dd4af18e6a85b25a4f4ef.tar.gz CMake-c79dd4d951eec397692dd4af18e6a85b25a4f4ef.tar.bz2 |
Merge topic 'read-less-from-version-headers'
4be6783 read less from version headers into variables
Diffstat (limited to 'Modules/FindBoost.cmake')
-rw-r--r-- | Modules/FindBoost.cmake | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index 607e249..17aba1b 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -729,7 +729,7 @@ set(Boost_ERROR_REASON) # set(BOOST_VERSION 0) set(BOOST_LIB_VERSION "") - file(READ "${Boost_INCLUDE_DIR}/boost/version.hpp" _boost_VERSION_HPP_CONTENTS) + file(STRINGS "${Boost_INCLUDE_DIR}/boost/version.hpp" _boost_VERSION_HPP_CONTENTS REGEX "#define BOOST_(LIB_)?VERSION ") if(Boost_DEBUG) message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " "location of version.hpp: ${Boost_INCLUDE_DIR}/boost/version.hpp") @@ -737,6 +737,7 @@ set(Boost_ERROR_REASON) string(REGEX REPLACE ".*#define BOOST_VERSION ([0-9]+).*" "\\1" Boost_VERSION "${_boost_VERSION_HPP_CONTENTS}") string(REGEX REPLACE ".*#define BOOST_LIB_VERSION \"([0-9_]+)\".*" "\\1" Boost_LIB_VERSION "${_boost_VERSION_HPP_CONTENTS}") + unset(_boost_VERSION_HPP_CONTENTS) set(Boost_LIB_VERSION ${Boost_LIB_VERSION} CACHE INTERNAL "The library version string for boost libraries") set(Boost_VERSION ${Boost_VERSION} CACHE INTERNAL "The version number for boost libraries") |