diff --git a/io/dcache/CMakeLists.txt b/io/dcache/CMakeLists.txt
index a6462f3e16ad53f2bcf9349e2dfcbd85a2f70d20..9e5603b0cb93efdcc777f2aefcaf252da51159f0 100644
--- a/io/dcache/CMakeLists.txt
+++ b/io/dcache/CMakeLists.txt
@@ -2,10 +2,7 @@
 # CMakeLists.txt file for building ROOT io/dcache package
 ############################################################################
 
-include_directories(${DCAP_INCLUDE_DIRS})
-add_definitions(-pthread)
-
-ROOT_ADD_CXX_FLAG(CMAKE_CXX_FLAGS -Wno-ignored-qualifiers)
+include_directories(SYSTEM ${DCAP_INCLUDE_DIRS})
 
 ROOT_GENERATE_DICTIONARY(G__DCache *.h MODULE DCache LINKDEF LinkDef.h)