I need help setting up gtest to add additional flags when compiling. Currently, I am getting this warning: warning: range-based ‘for’ loops only available with -std=c++11 or -std=gnu++11
My CMakeLists file looks like this:
cmake_minimum_required(VERSION 2.6)
find_package(GTest REQUIRED)
include_directories(${GTEST_INCLUDE_DIRS})
add_executable(runTests tests.cpp)
target_link_libraries(runTests ${GTEST_LIBRARIES} pthread)
It was created using this tutorial: http://ift.tt/2yKi2Ph
Where should I add the -std=c++11 flag to satisfy this warning?
Aucun commentaire:
Enregistrer un commentaire