3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-07 09:55:19 +00:00
Commit graph

80 commits

Author SHA1 Message Date
Nikolaj Bjorner 69f35a2970
Merge branch 'master' into intel-compiler 2018-10-02 11:54:52 -07:00
Bruce Mitchener a76397d3b8 Refer to macOS rather than Mac OS / OSX. 2018-10-02 17:38:09 +07:00
Nikolaj Bjorner be8a9c611e incorporate #1854
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-10-01 19:49:18 -07:00
Michał Janiszewski 5c9b1c7b11 Add support for Intel Compiler 2018-10-01 21:45:01 +02:00
Nikolaj Bjorner 0520d1a1f6 remove trial with mfsr flag
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-06-08 07:38:30 -07:00
Nikolaj Bjorner d7f51f2443 try flags to fix gcc build
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-06-06 18:20:23 -07:00
Nikolaj Bjorner 50c93d1ad4 merge with 4.7.1
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-05-22 17:10:36 -07:00
Nikolaj Bjorner 3b1b82bef0 bumping version number by 1 for release tagging
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-05-22 10:19:38 -07:00
Daniel Schemmel 7467368266
Use CMake's own mechanism for selecting language version if CMake version is new enough 2018-05-21 07:35:43 +02:00
Nikolaj Bjorner 78b9f0686a merge
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-05-01 07:43:29 -07:00
Nikolaj Bjorner 2dc92e2b94 merge with pull request #1557
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-04-07 17:22:49 -07:00
Nikolaj Bjorner 21a3b9c8e2 increment version number due to ABI/API breaking change #1556
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-03-31 05:20:47 -07:00
Pierre Pronchery 5f7bd993de Add support for NetBSD
Originally from David Holland <dholland@NetBSD.org>.
2018-03-13 21:59:35 +01:00
Nikolaj Bjorner 3d9139f6ef bump revision
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-03-10 12:07:55 -08:00
Nikolaj Bjorner e5a1981694 disable GCC flag change to see if this affects build
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-03-09 15:40:35 -05:00
Nikolaj Bjorner 4e31794c44
Merge pull request #1519 from waywardmonkeys/colorize-output-with-ninja
Force color output with Ninja.
2018-03-09 05:18:50 -05:00
Bruce Mitchener 878a6ca14f Fix typos. 2018-03-09 14:30:43 +07:00
Bruce Mitchener 0b54a91513 Force color output with Ninja. 2018-03-07 13:29:13 +07:00
Dan Liew e9be339d9d [CMake] Fix #1437.
The `clock_gettime()` function in glibc < 2.17 required linking against
librt. Until #1437 nobody had tried using the CMake build system with
a really old version of glibc (in this case 2.12).

The python build system always linked against librt but the CMake build
system never tried to link against it leading to link failures.

This patch teaches the CMake build system to detect if librt is required
when linking against `clock_gettime()` and adds `rt` as a link
dependency if necessary.
2018-01-03 12:50:42 +00:00
Christoph M. Wintersteiger 63951b815d Bumped version number. 2017-12-18 18:58:21 +00:00
Nikolaj Bjorner b96dacfff2 set version, fix build of test files
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-11-30 08:42:01 -08:00
Nikolaj Bjorner d1ee5431a7 Update version
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-11-28 14:19:30 -08:00
Nikolaj Bjorner e1d08e9526 remove reinterpret cast occurrences that require disabling strict alias analysis #987 #1210
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-08-17 20:41:29 -07:00
Nuno Lopes 4b00bc636b revert the patch to remove no-strict-aliasing
VS 2012 doesnt support C++11 unions..
2017-08-14 23:00:59 +01:00
Nuno Lopes 2473c69679 Drop no-strict-aliasing and fix 2 places where it was violated 2017-08-14 20:09:49 +01:00
Dan Liew e898f515f7 [CMake] Change how the default value of USE_OPENMP is set.
This change means if the user explicitly passes `-DUSE_OPENMP=ON` to
CMake during the first configure and the compiler does not support
OpenMP the configure will fail but if the user doesn't specify it the
build system will automatically enable/disable OpenMP support depending
on whether it is supported by the compiler.

This is an improvement on the previous behaviour because previously we
would just emit a warning if `-DUSE_OPENMP=ON` was passed and the
compiler didn't support OpenMP.
2017-08-12 18:37:03 +01:00
Nikolaj Bjorner 2b82fd5d0c updated include directives
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-08-01 10:51:47 -07:00
Daniel Perelman b06b9eeb35 Adding ENABLE_CFI flag to CMake. 2017-07-26 16:31:28 -07:00
Dan Liew 80c0c4f663 [CMake] Fix detection of git description and hash for CMake 2.8.12 2017-06-24 15:15:27 +01:00
Dan Liew 3229bedb36 [CMake] Unbreak the configure step for CMake 2.8.12 2017-06-24 14:41:33 +01:00
Dan Liew 489077a3eb [CMake] Remove use of INSTALL_PREFIX argument to
`configure_package_config_file()`. This argument wasn't available
until CMake 3.1 and we don't appear to be really using it anyway.
2017-06-24 14:16:48 +01:00
Dan Liew 5a8205cb0c [CMake] Unbreak detection of pthreads for CMake versions < 3.4 2017-06-24 14:05:25 +01:00
Dan Liew ed038c2a10 [CMake] Fix CMake warning about CMP0042 on macOS 2017-06-22 09:42:22 +01:00
Dan Liew 5be503798f [CMake] Remove bootstrap check. Now that the CMake files are in
their correct location we don't need it anymore.
2017-06-12 11:59:38 +01:00
Nikolaj Bjorner cfd598fabb Merge pull request #1036 from delcypher/cmake_remove_foci2_stub
[CMake] Remove FOCI2 stub code.
2017-05-22 09:20:54 -07:00
Dan Liew 702347ddac [CMake] Add CMake option API_LOG_SYNC that corresponds to the
`--log-sync` option added to the python/Makefile build system
added in dee7c29b19 .
2017-05-22 17:11:25 +01:00
Dan Liew a15419cf46 [CMake] Remove FOCI2 stub code.
The CMake build system doesn't need to support FOCI2 because it
has been removed from Z3's codebase in 4b61a864e2 .
2017-05-22 16:45:13 +01:00
Nikolaj Bjorner 911b24784a merge LRA
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-05-09 10:46:11 -07:00
Nikolaj Bjorner 579b914d78 add configuration per Dan Liew's comment
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-05-08 10:02:09 -07:00
Nikolaj Bjorner 99474eb44a integrate Dan Liew's patch for language selection
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-05-08 09:46:40 -07:00
Dan Liew 6e07d6dd2d [CMake] Override CMake's default flags for GCC/Clang as we were doing
before 4cc2b292c0.

It's useful to be able to control the defaults and CMake's internal
logic for GCC/Clang is simple enough that doing this makes sense.

It would be nice to do the same for MSVC but CMake's internal
logic is more complicated so for now it's better that we just use
CMake's default.
2017-04-29 17:45:02 +01:00
Dan Liew 870be706e9 [CMake] Try to do a better job of matching the old build system's
compiler defines and flags when using MSVC.

There are lots of defines and flags that I'm unsure about so in
some cases I've changed the behaviour slightly (if I'm confident
the behaviour in the old build system is wrong) or not added the
flag/define at all but just left comments noting what the old build
system did and why I disagree with the old build system's choices.
2017-04-29 16:22:46 +01:00
Dan Liew 0e1343e78d [CMake] Add support for link time optimization (LTO).
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.
2017-04-29 16:22:46 +01:00
Dan Liew fe1af4bcdb [CMake] Teach build system to pass /fp:precise to compiler when
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.
2017-04-29 16:22:46 +01:00
Dan Liew f568b2478f [CMake] Report the various values of CMAKE_CXX_FLAGS,
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.
2017-04-29 16:22:46 +01:00
Dan Liew 4cc2b292c0 [CMake] Remove compiler flag overrides and support for C language.
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.
2017-04-29 16:22:46 +01:00
Dan Liew d4b7b489d0 [CMake] Teach CMake to build the documentation for the API bindings
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.
2017-04-26 11:02:36 +01:00
Dan Liew ac85c68ccb [CMake] Fix examples linking against libz3 when it is built as a
static library on Linux.
2017-03-13 11:53:33 +00:00
Dan Liew b20bf5169a [CMake] Fix typo handling OpenMP flags. 2017-03-13 11:53:33 +00:00
Dan Liew 73614abf37 [CMake] Implement generation of Z3Config.cmake and Z3Target.cmake
file for the build and install tree.

These files allow users of CMake to use Z3 via a CMake config package.
Clients can do `find_package(Z3 CONFIG)` to get use the package from
their projects.

When generating the files for the install tree we try to generate
the files so that they are relocatable so that it shouldn't matter
if the installed files aren't in the CMAKE_INSTALL_PREFIX when
a user consumes them. As long as the relative locations of the files
aren't changed things should still work.

A new CMake cache variable `CMAKE_INSTALL_Z3_CMAKE_PACKAGE_DIR` has been
added so that the install location of the Z3 CMake package files can be
controlled.

This addresses #915 .
2017-03-13 11:53:27 +00:00