From: tbaudier Date: Wed, 11 Apr 2018 09:27:00 +0000 (+0200) Subject: Add c++11 flags with ITKv5 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=8cffc479dd4097920b47cb8b8d828b3ba40c1148;p=clitk.git Add c++11 flags with ITKv5 --- 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)