From f017ac27c372fdaab010e4441bcd1228e6efc8c1 Mon Sep 17 00:00:00 2001 From: zdd Date: Sun, 9 Apr 2017 23:49:12 +0800 Subject: [PATCH] use c++11 --- .travis.yml | 4 ++++ CMakeLists.txt | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 752457e..41f7b4f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,9 +6,13 @@ install: - sudo add-apt-repository --yes ppa:ubuntu-sdk-team/ppa - sudo add-apt-repository --yes ppa:lttng/daily - sudo add-apt-repository ppa:amarburg/opencv3 -y # opencv3 ppa + - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y + - sudo add-apt-repository ppa:boost-latest -y - sudo apt-get update -qq - sudo apt-get install -qq libopencv3-dev - sudo apt-get install -qq libboost-all-dev + - sudo apt-get install g++-4.8 -y + - export CXX="g++-4.8" script: - mkdir release && cd release - cmake .. diff --git a/CMakeLists.txt b/CMakeLists.txt index 674b67e..534440a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,8 @@ endif() set(HAVE_LIBPTHREAD YES) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") +add_definitions(-std=c++11) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") include_directories(/usr/local/include) include_directories(..)