]> Creatis software - clitk.git/commitdiff
Add c++11 flags with ITKv5
authortbaudier <thomas.baudier@creatis.insa-lyon.fr>
Wed, 11 Apr 2018 09:27:00 +0000 (11:27 +0200)
committertbaudier <thomas.baudier@creatis.insa-lyon.fr>
Wed, 11 Apr 2018 09:27:00 +0000 (11:27 +0200)
cmake/dependencies.cmake

index a871fecd0d19523b2fa28823856adcf5637c32ed..747cd52a0486a59a5d8597117adb767d82004368 100644 (file)
@@ -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)