This analogous to the `--optimize` flag in the Python/Makefile
build system except that we now support doing LTO with Clang/GCC
as well. However it is probably best to avoid doing LTO with
Clang or GCC for now because I see a bunch of warnings about
ODR violations when building with LTO.
LTO can be enabled with the new `LINK_TIME_OPTIMIZATION` option
which is off by default.
using MSVC. This is set by the old build system but we weren't setting
it. This actually MSVC's default but in an effort to try to behave
more like the old build system we will set it anyway.
CMAKE_CXX_FLAGS_<CONFIG>, CMAKE_<TYPE>_LINKER_FLAGS, and
CMAKE_<TYPE>_LINKER_FLAGS_<CONFIG>.
This is useful for debugging where some flags come from. Now that
we don't explicitly set the defaults it useful to see which default
values we are getting from CMake.
The setting of overrides was broken (the CXX flags were not set but
the C flags were) and we aren't even using the C compiler any more.
The C compiler is used by the example C project but that is built
as an external project now so we don't need C support anymore.
The setting of defaults was also very fragile. CMake has quite
complicated support here (e.g. MSVC with a clang based tool chain) which
would likely not work properly with the override approach as it existed.
This means we loose some of the custom linker flags we were setting for
MSVC but we were never doing a great job of replicating the exact set of
flags used in the old build system anyway. Subsequent commits will
gradually fix this.
and install them. The target for building the documentation is
`api_docs`.
This is off by default but can be enabled with the
`BUILD_DOCUMENTATION` option. The C and C++ API documentation
is always built but the Python, ".NET", and Java documentation are
only built if they are enabled in the build system. The rationale
for this is that it would be confusing to install documentation
for API bindings that are not installed.
By default `ALWAYS_BUILD_DOCS` is on which will slow down builds
significantly but will ensure that when the `install` target is
invoked the documentation is up-to-date. Unfortunately I couldn't
find a better way to do this. `ALWAYS_BUILD_DOCS` can be disabled
to get faster builds and still have the `api_docs` target available.
for the ".NET" and "Java" bindings. The CMake build system needs
this because the generated files exist in a different directory
to the source files.
Multiple paths can be specified using the `--dot-search-paths` and
`--java-search-paths` options.
bindings from appearing in the generated documentation. This can
be enabled with `--no-dotnet`, `--no-z3py`, and `--no-java`
respectively.
This fine-grained control is being added for the CMake build system
which will need this control.
`mk_api_doc.py` so that the location of the z3py package can
be specified. This is needed by the CMake build system because
the complete Z3py package is not emitted in the source tree.
Also fix a bug in the path added to the module/package search path.
The directory containing the `z3` package needs to be added not
the `z3` package directory itself.
(`--output-dir`) to control where output files are emitted.
This is implemented by making `z3api.dox` a template file
(renamed `z3api.cfg.in`) and populating the template at build
time with the required settings.
which allows the location of the temporary directory to be controlled.
While I'm here also write `website.dox` into the temporary directory
where it belongs instead of in the source tree and simplify the logic
that deletes the temporary directory and its contents.
Referring to the ``mk_make.py`` line might lead someone to think they
need to modify the ``mk_make.py`` file rather than change the command
line invocation.