From fc36777e66c71fb975b344a8930bd7980b4f5e9f Mon Sep 17 00:00:00 2001 From: Jon Siwek Date: Tue, 10 Feb 2015 12:34:47 -0600 Subject: [PATCH] Add --enable-c++11 configure flag. And try to detect that compiler version is sufficient for C++11 support. --enable-broker implies --enable-c++11 --- CMakeLists.txt | 5 ++++- aux/broker | 2 +- cmake | 2 +- configure | 5 +++++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b31e60ac01..28ebc8b568 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -177,8 +177,11 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) ######################################################################## ## Recurse on sub-directories +if ( ENABLE_CXX11 ) + include(RequireCXX11) +endif () + if ( ENABLE_BROKER ) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") add_subdirectory(aux/broker) set(brodeps ${brodeps} broker) add_definitions(-DENABLE_BROKER) diff --git a/aux/broker b/aux/broker index 4fae86cd67..0af74017e2 160000 --- a/aux/broker +++ b/aux/broker @@ -1 +1 @@ -Subproject commit 4fae86cd67b999f48a2f2f354c91e4b1b343b2a1 +Subproject commit 0af74017e28d78179a25d60ca80385af444d39f1 diff --git a/cmake b/cmake index c2057b7f15..532dd04e8c 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit c2057b7f15dedc27641a50312384505ce4f2112c +Subproject commit 532dd04e8c5027c613a65ea10bcdbaf5e876fcfa diff --git a/configure b/configure index 6235aba7dd..3f7295711c 100755 --- a/configure +++ b/configure @@ -41,6 +41,7 @@ Usage: $0 [OPTION]... [VAR=VALUE]... --enable-perftools-debug use Google's perftools for debugging --enable-jemalloc link against jemalloc --enable-ruby build ruby bindings for broccoli (deprecated) + --enable-c++11 build using the C++11 standard --enable-broker enable use of the Broker communication library (requires C++ Actor Framework and C++11) --disable-broccoli don't build or install the Broccoli library @@ -182,7 +183,11 @@ while [ $# -ne 0 ]; do --enable-jemalloc) append_cache_entry ENABLE_JEMALLOC BOOL true ;; + --enable-c++11) + append_cache_entry ENABLE_CXX11 BOOL true + ;; --enable-broker) + append_cache_entry ENABLE_CXX11 BOOL true append_cache_entry ENABLE_BROKER BOOL true ;; --disable-broccoli)