From b5640f3e6a71009ac82b58694dd6c52a3c368bc3 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Mon, 11 Jul 2016 04:33:40 -0500 Subject: [PATCH] CMake: Add a guard around FIND_SYSTEM_LIBRARY for windows On Windows targets the rt library is not available and somehow we pick it up. Thus, guard the whole configuration. Closes #2397 --- cmake/configure/configure_boost.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cmake/configure/configure_boost.cmake b/cmake/configure/configure_boost.cmake index a097da7944..1ffbd701a7 100644 --- a/cmake/configure/configure_boost.cmake +++ b/cmake/configure/configure_boost.cmake @@ -26,10 +26,12 @@ MACRO(FEATURE_BOOST_CONFIGURE_BUNDLED) # # Add rt to the link interface as well, boost/chrono needs it. # - FIND_SYSTEM_LIBRARY(rt_LIBRARY NAMES rt) - MARK_AS_ADVANCED(rt_LIBRARY) - IF(NOT rt_LIBRARY MATCHES "-NOTFOUND") - SET(BOOST_LIBRARIES ${rt_LIBRARY}) + IF(NOT CMAKE_SYSTEM_NAME MATCHES "Windows") + FIND_SYSTEM_LIBRARY(rt_LIBRARY NAMES rt) + MARK_AS_ADVANCED(rt_LIBRARY) + IF(NOT rt_LIBRARY MATCHES "-NOTFOUND") + SET(BOOST_LIBRARIES ${rt_LIBRARY}) + ENDIF() ENDIF() ENABLE_IF_SUPPORTED(BOOST_CXX_FLAGS "-Wno-unused-local-typedefs") -- 2.39.5