diff --git a/CMake/OTBModuleHeaderTest.cmake b/CMake/OTBModuleHeaderTest.cmake
index 17587f1d300c1c95c1c9f802eb4fae437930302c..ab87de1195ac2a65fbd688cc2859b742e287379d 100644
--- a/CMake/OTBModuleHeaderTest.cmake
+++ b/CMake/OTBModuleHeaderTest.cmake
@@ -19,6 +19,32 @@ add_custom_target( OTBHeaderTests
   ${CMAKE_COMMAND} --build ${OTB_BINARY_DIR}
   COMMENT "Regenerating and building the header tests." )
 
+
+
+SET(BANNED_HEADERS)
+if(NOT OTB_USE_OPENCV)
+	string(CONCAT BANNED_HEADERS ${BANNED_HEADERS} "otbDecisionTreeMachineLearningModelFactory.h otbDecisionTreeMachineLearningModel.h otbKNearestNeighborsMachineLearningModelFactory.h otbKNearestNeighborsMachineLearningModel.h otbRandomForestsMachineLearningModelFactory.h otbRandomForestsMachineLearningModel.h otbSVMMachineLearningModelFactory.h otbSVMMachineLearningModel.h otbGradientBoostedTreeMachineLearningModelFactory.h otbGradientBoostedTreeMachineLearningModel.h otbBoostMachineLearningModelFactory.h otbBoostMachineLearningModel.h otbNeuralNetworkMachineLearningModelFactory.h otbNeuralNetworkMachineLearningModel.h otbNormalBayesMachineLearningModelFactory.h otbNormalBayesMachineLearningModel.h otbRequiresOpenCVCheck.h ")
+	string(STRIP ${BANNED_HEADERS} BANNED_HEADERS)
+	string(CONCAT BANNED_HEADERS ${BANNED_HEADERS} " ")
+endif()
+ 
+if(NOT OTB_USE_LIBSVM)
+	string(CONCAT BANNED_HEADERS ${BANNED_HEADERS} "otbLibSVMMachineLearningModel.h otbLibSVMMachineLearningModelFactory.h")
+	string(STRIP ${BANNED_HEADERS} BANNED_HEADERS)
+	string(CONCAT BANNED_HEADERS ${BANNED_HEADERS} " ")
+endif()
+
+# ************ ADD YOUR BANNED HEADERS HERE ************
+#if(CONDITION)
+#	string(CONCAT BANNED_HEADERS ${BANNED_HEADERS} "BANNED-HEADER1.h")
+#	string(STRIP ${BANNED_HEADERS} BANNED_HEADERS)
+#	string(CONCAT BANNED_HEADERS ${BANNED_HEADERS} " ")
+#endif()
+
+string(STRIP ${BANNED_HEADERS} BANNED_HEADERS)
+
+
+
 macro( otb_module_headertest _name )
   if( NOT ${_name}_THIRD_PARTY AND
       EXISTS ${${_name}_SOURCE_DIR}/include
@@ -83,6 +109,7 @@ macro( otb_module_headertest _name )
         ${${_name}_BINARY_DIR}
         ${MAXIMUM_NUMBER_OF_HEADERS}
         ${_test_num}
+        ${BANNED_HEADERS}
         )
       add_executable( ${_test_name} ${_header_test_src} )
       target_link_libraries( ${_test_name} OTBCommon )
diff --git a/Modules/Learning/Supervised/include/otbMachineLearningModelFactory.txx b/Modules/Learning/Supervised/include/otbMachineLearningModelFactory.txx
index 36372b8ab33e4521e71c9ae3e0bf03980b427be8..7fe0d4301ec2140673fe1add92107798edd75b38 100644
--- a/Modules/Learning/Supervised/include/otbMachineLearningModelFactory.txx
+++ b/Modules/Learning/Supervised/include/otbMachineLearningModelFactory.txx
@@ -28,7 +28,9 @@
 #include "otbDecisionTreeMachineLearningModelFactory.h"
 #include "otbGradientBoostedTreeMachineLearningModelFactory.h"
 #endif
+#ifdef OTB_USE_LIBSVM
 #include "otbLibSVMMachineLearningModelFactory.h"
+#endif
 
 #include "itkMutexLockHolder.h"
 
@@ -88,8 +90,10 @@ MachineLearningModelFactory<TInputValue,TOutputValue>
 ::RegisterBuiltInFactories()
 {
   itk::MutexLockHolder<itk::SimpleMutexLock> lockHolder(mutex);
-
+  
+#ifdef OTB_USE_LIBSVM
   RegisterFactory(LibSVMMachineLearningModelFactory<TInputValue,TOutputValue>::New());
+#endif
 
 #ifdef OTB_USE_OPENCV
   RegisterFactory(RandomForestsMachineLearningModelFactory<TInputValue,TOutputValue>::New());
diff --git a/Utilities/Maintenance/BuildHeaderTest.py b/Utilities/Maintenance/BuildHeaderTest.py
index f98860681b692a4a27666eab6d4a4360b6470132..d98035598c85448aea07616433872369c1edca6d 100644
--- a/Utilities/Maintenance/BuildHeaderTest.py
+++ b/Utilities/Maintenance/BuildHeaderTest.py
@@ -30,8 +30,8 @@ test is to make sure there are not missing module dependencies.  It also tests
 for syntax and missing #include's.
 """
 
-# Headers to not test because of dependecy issues, etc.
-BANNED_HEADERS = set(()) # No banned headers in OTB for now
+# BANNED_HEADERS = Headers to not test because of dependecy issues, etc.
+
 
 HEADER = """/*=========================================================================
  *
@@ -81,6 +81,7 @@ def main():
     module_binary_path = sys.argv[3]
     maximum_number_of_headers = int(sys.argv[4])
     test_num           = int(sys.argv[5])
+    BANNED_HEADERS = sys.argv[6].split(' ')
 
     # Get all the header files.
     include_dir = os.path.join(module_source_path, 'include')