mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-12 21:28:48 +00:00
[CMake][Z3]Don't attempt to compile / run if cross-compiling (#66355)
Otherwise CMake might throw and error: CMake Error: try_run() invoked in cross-compiling mode, please set the following cache variables appropriately: Z3_RETURNCODE (advanced) Z3_RETURNCODE__TRYRUN_OUTPUT (advanced)
This commit is contained in:
parent
9bbbfbc7fd
commit
5664b56043
@ -75,7 +75,7 @@ unset(Z3_VERSION_STRING)
|
||||
|
||||
# First, try to check it dynamically, by compiling a small program that
|
||||
# prints Z3's version
|
||||
if(Z3_INCLUDE_DIR AND Z3_LIBRARIES)
|
||||
if(Z3_INCLUDE_DIR AND Z3_LIBRARIES AND NOT CMAKE_CROSSCOMPILING)
|
||||
# We do not have the Z3 binary to query for a version. Try to use
|
||||
# a small C++ program to detect it via the Z3_get_version() API call.
|
||||
check_z3_version(${Z3_INCLUDE_DIR} ${Z3_LIBRARIES})
|
||||
|
Loading…
x
Reference in New Issue
Block a user