From cdcfae4b41f3884358aebd4174c58b6fb42e0e51 Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Sat, 16 Feb 2013 17:10:01 -0800 Subject: [PATCH] Bringing back the Boost.Chrono workaround Fixes #124 --- cpp/BoostParts/CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cpp/BoostParts/CMakeLists.txt b/cpp/BoostParts/CMakeLists.txt index 07b5585e..bb86c7d8 100644 --- a/cpp/BoostParts/CMakeLists.txt +++ b/cpp/BoostParts/CMakeLists.txt @@ -77,6 +77,15 @@ endif() ############################################################################# +# Due to a bug/misconfiguration/stupidity, boost 1.52 and libc++ don't like each +# other much: a compilation error "Constexpr function never produces a constant +# expression" pops up when trying to compile anything that uses +# boost/chrono/duration.hpp (namely boost/thread for us). This is a workaround +# that prevents this from happening. Also present in cpp/ycm/CMakeLists.txt. +# See here for more details: https://svn.boost.org/trac/boost/ticket/7671 +# TODO: remove this when it's fixed upstream (probably boost 1.53). +add_definitions( -DBOOST_THREAD_DONT_USE_CHRONO ) + if( MSVC ) # BOOST_PYTHON_SOURCE makes boost use the correct __declspec and # BOOST_ALL_NO_LIB turns off MSVC library autolinking