diff --git a/cmake/XRootDOSDefs.cmake b/cmake/XRootDOSDefs.cmake
index 85f7583..81a654e 100644
--- a/cmake/XRootDOSDefs.cmake
+++ b/cmake/XRootDOSDefs.cmake
@@ -24,6 +24,10 @@ if( CMAKE_COMPILER_IS_GNUCXX )
AND GCC_VERSION VERSION_LESS 4.2 )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-strict-aliasing" )
endif()
+ # gcc 6.0 is more pedantic
+ if( GCC_VERSION VERSION_GREATER 6.0 OR GCC_VERSION VERSION_EQUAL 6.0 )
+ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=misleading-indentation" )
+ endif()
endif()
#-------------------------------------------------------------------------------