3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-08-02 12:13:25 +00:00
z3/cmake
davedets 4ee79af337
Disable "-Wnoctad-maybe-unsupported", add and fix "-Wdeprecated-copy-with-user-provided-copy". (#10332)
This is another PR towards the goal of getting Z3 to compile cleanly
when included via FetchContents into clang-tidy, which uses a pretty
strict set of warnings. (2 more flags after this!)

The first of these was -Wctad-maybe-unsupported. That has to do with
"class template argument deduction" -- the flag requires template
deduction guides to be explicitly provided if templated types are used
in situations that requires argument deduction. This fired for various
uses of templated types in the utils directory.

I decided that this should be a case of if it ain't broke, don't fix it,
and explicitly disabled the warning in the Z3 build (which will override
the setting if the flag is enabled in a larger build including Z3, like
clang).

-----

The second flag has to do with the C++ "rule of 3". Here is Google's AI
summary (inf_s_integer is a class in Z3 that triggered the warning):

_This warning means your inf_s_integer class defines a custom copy
assignment operator but lacks a user-defined copy constructor, which the
C++ standard deprecates to encourage the "Rule of Three". To fix this,
explicitly declare and = default the copy constructor in your class
definition._

_...example of how to fix..._

_This updates your code to modern C++ standards, cleanly silencing the
warning._

This seemed like a good standard to follow, and didn't require too many
changes, so I propose them.
2026-07-31 19:34:08 -07:00
..
modules Bump dotnet example target framework from netcoreapp2.0 to net8.0 (#9531) 2026-05-14 15:17:41 -07:00
check_link_atomic.cmake cmake: skip std::atomic link check for Emscripten and single-threaded builds (#9932) 2026-06-23 14:05:02 -06:00
cmake_uninstall.cmake.in
compiler_lto.cmake clean up CMake code (#5182) 2021-04-14 10:29:15 -07:00
compiler_warnings.cmake Disable "-Wnoctad-maybe-unsupported", add and fix "-Wdeprecated-copy-with-user-provided-copy". (#10332) 2026-07-31 19:34:08 -07:00
cxx_compiler_flags_overrides.cmake
git_utils.cmake Use '--tags' rather than '--long' for git describe. Closes #6823 (#7833) 2025-08-29 14:15:38 -07:00
msvc_legacy_quirks.cmake clean up CMake code (#5182) 2021-04-14 10:29:15 -07:00
target_arch_detect.cmake Change from BINARY_DIR to PROJECT_BINARY_DIR 2019-05-15 11:25:40 -07:00
target_arch_detect.cpp set ARM64 if detected under OSX 2022-04-07 08:35:56 +02:00
z3_add_component.cmake cmake: prevent install_tactic.deps from triggering spurious rebuilds on reconfigure (#10102) 2026-07-12 20:07:41 -07:00
z3_add_cxx_flag.cmake [CMake] Change the WARNINGS_AS_ERRORS option from BOOL to STRING 2017-07-09 14:34:30 +01:00
z3_append_linker_flag_list_to_target.cmake mux 2019-06-05 09:06:17 +01:00
Z3Config.cmake.in Fix Z3Config.cmake.in when generating a static library (#5555) 2021-09-17 18:03:10 +01:00