From fd4c34c38b728829e0f3177bc43ce679edb50817 Mon Sep 17 00:00:00 2001 From: John Maguire Date: Wed, 21 Nov 2012 17:12:57 +0100 Subject: [PATCH] Build tests as permissive C++0x --- tests/CMakeLists.txt | 2 ++ tests/concurrentrun_test.cpp | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 3a493fd23..acfe67d7b 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,5 +1,7 @@ cmake_minimum_required(VERSION 2.6) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -U__STRICT_ANSI__ -fpermissive") + if(USE_SYSTEM_GMOCK) include_directories(${GMOCK_INCLUDE_DIRS} ${GTEST_INCLUDE_DIRS}) else(USE_SYSTEM_GMOCK) diff --git a/tests/concurrentrun_test.cpp b/tests/concurrentrun_test.cpp index 8010b955f..09eb3f21f 100644 --- a/tests/concurrentrun_test.cpp +++ b/tests/concurrentrun_test.cpp @@ -1,11 +1,11 @@ #include "gtest/gtest.h" +#include + #include #include #include -#include - #include "core/concurrentrun.h" #include "test_utils.h" @@ -143,7 +143,7 @@ TEST(ConcurrentRunTest, ConcurrentRunVoidBindFunctionStart) { A a; int nb = 10; - QFuture future = ConcurrentRun::Run(&threadpool, std::tr1::bind(&A::f, &a, &nb)); + QFuture future = ConcurrentRun::Run(&threadpool, std::bind(&A::f, &a, &nb)); QFutureWatcher watcher; watcher.setFuture(future); QEventLoop loop;