From 8cffc479dd4097920b47cb8b8d828b3ba40c1148 Mon Sep 17 00:00:00 2001 From: tbaudier Date: Wed, 11 Apr 2018 11:27:00 +0200 Subject: [PATCH] Add c++11 flags with ITKv5 --- cmake/dependencies.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake index a871fec..747cd52 100644 --- a/cmake/dependencies.cmake +++ b/cmake/dependencies.cmake @@ -3,6 +3,9 @@ find_package(ITK) if(ITK_FOUND) include("${ITK_USE_FILE}") + if(ITK_VERSION VERSION_GREATER_EQUAL 5.0.0) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + endif(ITK_VERSION VERSION_GREATER_EQUAL 5.0.0) else(ITK_FOUND) message(FATAL_ERROR "Cannot build without ITK. Please set ITK_DIR.") endif(ITK_FOUND) -- 2.47.1