From 84a4ef7cd889bcf54e0ef1f0bf5ee57e5934caa7 Mon Sep 17 00:00:00 2001 From: Daniel Scharrer Date: Tue, 10 Jul 2012 00:14:44 +0200 Subject: [PATCH] Don't use -std=c++11 with older Boost versions C++11 mode will cause errors when using Boost < 1.48. --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c709d40..c6ac65f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,7 +55,11 @@ list(APPEND LIBRARIES "${Boost_LIBRARIES}") link_directories("${Boost_LIBRARY_DIRS}") include_directories(SYSTEM "${Boost_INCLUDE_DIR}") -add_cxxflag("-std=c++11") +if(${Boost_VERSION} LESS 104800) + # Older Boost versions don't work with C++11 +else() + add_cxxflag("-std=c++11") +endif() add_cxxflag("-Wall") add_cxxflag("-Wextra")