aboutsummaryrefslogtreecommitdiff
path: root/cmake/compiler/clang
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/compiler/clang')
-rw-r--r--cmake/compiler/clang/settings.cmake9
1 files changed, 7 insertions, 2 deletions
diff --git a/cmake/compiler/clang/settings.cmake b/cmake/compiler/clang/settings.cmake
index 626d73cc42b..53ff022a7e0 100644
--- a/cmake/compiler/clang/settings.cmake
+++ b/cmake/compiler/clang/settings.cmake
@@ -1,3 +1,5 @@
+include(CheckCXXSourceCompiles)
+
# Set build-directive (used in core to tell which buildtype we used)
target_compile_definitions(trinity-compile-option-interface
INTERFACE
@@ -13,8 +15,11 @@ if(WITH_WARNINGS)
-Wfatal-errors
-Wno-mismatched-tags
-Woverloaded-virtual)
-
- if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10)
+
+ set(CMAKE_REQUIRED_FLAGS "-Wno-deprecated-copy")
+ check_cxx_source_compiles("int main() { return 0; }" CLANG_HAS_DEPRECATED_COPY)
+ unset(CMAKE_REQUIRED_FLAGS)
+ if(CLANG_HAS_DEPRECATED_COPY)
target_compile_options(trinity-warning-interface
INTERFACE
-Wno-deprecated-copy) # warning in g3d