3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-31 07:14:54 +00:00

[TravisCI][CMake] Add Z3_C_EXAMPLES_FORCE_CXX_LINKER CMake option

and propagate its value into the C API examples.

This flag forces the C API examples to use the C++ compiler as the
linker rather than the C compiler. This a workaround to avoid linking
errors when building with UBSan.
This commit is contained in:
Dan Liew 2017-10-06 15:25:41 +01:00
parent 64ee9f168d
commit a9fcfc531b
5 changed files with 52 additions and 2 deletions

View file

@ -270,6 +270,7 @@ The following useful options can be passed to CMake whilst configuring.
* ``API_LOG_SYNC`` - BOOL. If set to ``TRUE`` will enable experimental API log sync feature.
* ``WARNINGS_AS_ERRORS`` - STRING. If set to ``TRUE`` compiler warnings will be treated as errors. If set to ``False`` compiler warnings will not be treated as errors.
If set to ``SERIOUS_ONLY`` a subset of compiler warnings will be treated as errors.
* ``Z3_C_EXAMPLES_FORCE_CXX_LINKER`` - BOOL. If set to ``TRUE`` the C API examples will request that the C++ linker is used rather than the C linker.
On the command line these can be passed to ``cmake`` using the ``-D`` option. In ``ccmake`` and ``cmake-gui`` these can be set in the user interface.