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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits