Skip to content
Snippets Groups Projects
Commit 044b267f authored by Guilherme Amadio's avatar Guilherme Amadio Committed by Pere Mato
Browse files

[Cling] Disable warnings unknown to GCC or caused by LLVM

GCC does not understand the option -Wconditional-uninitialized,
and warns about some maybe uninitialized variables in LLVM.
parent c3579325
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,11 @@ include_directories(${LLVM_INCLUDE_DIRS} ${CLING_INCLUDE_DIRS})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/res ${CMAKE_CURRENT_SOURCE_DIR}/../foundation/res)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CLING_CXXFLAGS}")
# This is to avoid warnings coming from GCC 7 in llvm/src/include/llvm/ADT/DenseMap.h:1010
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
ROOT_ADD_CXX_FLAG(CMAKE_CXX_FLAGS -Wno-maybe-uninitialized)
endif()
ROOT_OBJECT_LIBRARY(ClingUtils ${sources})
add_dependencies(ClingUtils CLING)
......
......@@ -19,9 +19,16 @@ else()
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/src/TClingCallbacks.cxx COMPILE_FLAGS -fno-rtti)
endif()
# This to avoid warning coming from message coming from llvm/src/tools/clang/include/clang/Sema/Lookup.h:441
# This to avoid warning coming from llvm/src/tools/clang/include/clang/Sema/Lookup.h:441
# in clang + llvm version r227800.
ROOT_ADD_CXX_FLAG(CMAKE_CXX_FLAGS -Wno-conditional-uninitialized)
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
ROOT_ADD_CXX_FLAG(CMAKE_CXX_FLAGS -Wno-conditional-uninitialized)
endif()
# This is to avoid warnings coming from GCC 7 in llvm/src/include/llvm/ADT/DenseMap.h:1010
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
ROOT_ADD_CXX_FLAG(CMAKE_CXX_FLAGS -Wno-maybe-uninitialized)
endif()
ROOT_OBJECT_LIBRARY(MetaCling ${sources})
add_dependencies(MetaCling CLING)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment