Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1978 from sanssecours/🐛
Browse files Browse the repository at this point in the history
Tools: Disable Warning About Virtual Destructors
  • Loading branch information
markus2330 authored May 12, 2018
2 parents a843f87 + ac691e2 commit 7f4f75a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/libs/tools/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ add_toolheaders(HDR_FILES)

file (GLOB_RECURSE SRC_FILES *.cpp)

# TODO: Reenable the following warning after we add a virtual destructor to `PluginDatabase`, and its subclasses.
# See also:
# - https://github.com/ElektraInitiative/libelektra/pull/1841
# - https://github.com/ElektraInitiative/libelektra/commit/15d67328
if (CMAKE_C_COMPILER_ID MATCHES "Clang")
set_source_files_properties (backendbuilder.cpp PROPERTIES COMPILE_FLAGS -Wno-delete-non-virtual-dtor)
endif (CMAKE_C_COMPILER_ID MATCHES "Clang")

set (SOURCES ${SRC_FILES} ${HDR_FILES})

set (__symbols_file ${CMAKE_CURRENT_SOURCE_DIR}/libelektratools-symbols.map)
Expand Down
14 changes: 14 additions & 0 deletions src/libs/tools/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@ if (error_index GREATER -1)
endif (error_index GREATER -1)

file (GLOB TESTS testtool_*.cpp)

# TODO: Reenable the following warning after we add a virtual destructor to `PluginDatabase`, and its subclasses.
# See also:
# - https://github.com/ElektraInitiative/libelektra/pull/1841
# - https://github.com/ElektraInitiative/libelektra/commit/15d67328
if (CMAKE_C_COMPILER_ID MATCHES "Clang")
set_source_files_properties (testtool_specreader.cpp
testtool_backendbuilder.cpp
testtool_backendparser.cpp
PROPERTIES
COMPILE_FLAGS
-Wno-delete-non-virtual-dtor)
endif (CMAKE_C_COMPILER_ID MATCHES "Clang")

foreach (file ${TESTS})
get_filename_component (name ${file} NAME_WE)
if (NOT (name MATCHES testtool_mergingkdb AND (NOT ERROR_PLUGIN_AVAILABLE)))
Expand Down

0 comments on commit 7f4f75a

Please sign in to comment.