diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4e36e18daa436dee1c3c319047523de4d6297165..afc60cf7c313d9494a1044fa4692ab5ded299942 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -135,6 +135,10 @@ ELSE(WIN32)
     ENDIF(OTB_BUILD_PEDANTIC)
   ENDIF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
 ENDIF(WIN32)
+
+OPTION(OTB_USE_DEPRECATED "Turn on the use and test of deprecated classes" OFF)
+MARK_AS_ADVANCED(OTB_USE_DEPRECATED)
+
 #-----------------------------------------------------------------------------
 
 # Use the openjpeg library.