From f7c991eb3601ae807f75425c88c8b62990717393 Mon Sep 17 00:00:00 2001 From: John Cant Date: Mon, 5 Feb 2018 23:46:32 +0000 Subject: [PATCH] Build SFM with C++11 if Ceres was built with C++11 --- modules/sfm/CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/sfm/CMakeLists.txt b/modules/sfm/CMakeLists.txt index 26603b591..c1731d345 100644 --- a/modules/sfm/CMakeLists.txt +++ b/modules/sfm/CMakeLists.txt @@ -63,6 +63,15 @@ else() message(STATUS "CERES support is disabled. Ceres Solver for reconstruction API is required.") endif() +### COMPILE WITH C++11 IF CERES WAS COMPILED WITH C++11 + +if(Ceres_FOUND) + list (FIND CERES_COMPILED_COMPONENTS "C++11" _index) + if (${_index} GREATER -1) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + endif() +endif() + ### DEFINE OPENCV SFM MODULE DEPENDENCIES ### ### CREATE OPENCV SFM MODULE ###