Permalink
Browse files

Boost seems to need -lrt for >= 1.55

  • Loading branch information...
lgritz committed Jul 17, 2014
1 parent c3e4a7e commit e310f6f977a699837a38132c51f72ba14b9248b2
Showing with 8 additions and 0 deletions.
  1. +2 −0 site/spi/Makefile-bits
  2. +6 −0 src/cmake/externalpackages.cmake
View
@@ -67,8 +67,10 @@ ifeq ($(SP_OS), spinux1)
BOOSTVERS=1.51
endif
BOOSTVERS_SUFFIX = -${shell echo ${BOOSTVERS} | sed "s/\\./_/"}
+ CONSTRUCTED_BOOSTVERS = ${shell echo ${BOOSTVERS} | sed "s/\\./0/"}00
MY_CMAKE_FLAGS += \
-DBOOST_CUSTOM=1 \
+ -DBoost_VERSION=${CONSTRUCTED_BOOSTVERS} \
-DBoost_INCLUDE_DIRS=/usr/include/boost_${BOOSTVERS} \
-DBoost_LIBRARY_DIRS=/usr/lib64/boost_${BOOSTVERS} \
-DBoost_LIBRARIES:STRING="/usr/lib64/boost_${BOOSTVERS}/libboost_filesystem-gcc44-mt${BOOSTVERS_SUFFIX}.so;/usr/lib64/boost_${BOOSTVERS}/libboost_filesystem-gcc44-mt${BOOSTVERS_SUFFIX}.so;/usr/lib64/boost_${BOOSTVERS}/libboost_regex-gcc44-mt${BOOSTVERS_SUFFIX}.so;/usr/lib64/boost_${BOOSTVERS}/libboost_system-gcc44-mt${BOOSTVERS_SUFFIX}.so;/usr/lib64/boost_${BOOSTVERS}/libboost_thread-gcc44-mt${BOOSTVERS_SUFFIX}.so;/usr/lib64/boost_${BOOSTVERS}/libboost_wave-gcc44-mt${BOOSTVERS_SUFFIX}.so" \
@@ -73,6 +73,12 @@ else ()
find_package (Boost 1.42 REQUIRED
COMPONENTS ${Boost_COMPONENTS}
)
+
+endif ()
+
+# On Linux, Boost 1.55 and higher seems to need to link against -lrt
+if (CMAKE_SYSTEM_NAME MATCHES "Linux" AND ${Boost_VERSION} GREATER 105499)
+ list (APPEND Boost_LIBRARIES "rt")
endif ()
if (VERBOSE)

0 comments on commit e310f6f

Please sign in to comment.