[PATCH] D54978: Move the SMT API to LLVM

Brian Rzycki via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 14 15:38:44 PST 2019


brzycki added a comment.

In D54978#1397354 <https://reviews.llvm.org/D54978#1397354>, @ddcc wrote:

> In D54978#1397316 <https://reviews.llvm.org/D54978#1397316>, @mikhail.ramalho wrote:
>
> > I just sent the first prototype of the solution. All the magic happens inside the `CHECK_CXX_SOURCE_RUNS` call.
>
>
> I think hardcoding the version into the binary is too brittle. Instead, your program can just print out the current z3 version (much like the current execution of the z3 binary), and the remaining logic can remain in CMake, with the fallbacks as suggested above by @brzycki.


I don't think there is a mechanism to do so easily within CMake. The `CHECK_CXX_SOURCE_RUNS` call only returns a boolean answer, not stdout. You have to use the underlying `try_run()` command along with `RUN_OUTPUT_VARIABLE` to obtain a given version. This interface seems less simple than the `CHECK_CXX_*` macros.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54978/new/

https://reviews.llvm.org/D54978





More information about the cfe-commits mailing list