mirror of
https://github.com/Z3Prover/z3
synced 2025-04-29 11:55:51 +00:00
Move CMakeLists.txt files (other than the one in the repository root)
and the cmake directory into a new directory ``contrib/cmake`` that mirrors the directory structure of the root. This is a comprimise between me and Christoph Wintersteiger that was suggested by Arie Gurfinkel that allows the CMake build system to live in the Z3 repository but not impact the Z3 developers that want to avoid the CMake build system. The build system will not work in its new location and a bootstrap script will soon be provided that allows a developer to copy the files back to their correct location.
This commit is contained in:
parent
d54d6b50f0
commit
a3e0eae9ec
82 changed files with 0 additions and 0 deletions
|
@ -1,22 +0,0 @@
|
|||
###############################################################################
|
||||
# Target detection
|
||||
#
|
||||
# We abuse the compiler preprocessor to work out what target the compiler is
|
||||
# building for. The nice thing about this approach is that we'll detect the
|
||||
# right target even if we are using a cross compiler.
|
||||
###############################################################################
|
||||
function(detect_target_architecture OUTPUT_VAR)
|
||||
try_run(run_result
|
||||
compile_result
|
||||
"${CMAKE_BINARY_DIR}"
|
||||
"${CMAKE_SOURCE_DIR}/cmake/target_arch_detect.cpp"
|
||||
COMPILE_OUTPUT_VARIABLE compiler_output
|
||||
)
|
||||
if (compile_result)
|
||||
message(FATAL_ERROR "Expected compile to fail")
|
||||
endif()
|
||||
string(REGEX MATCH "CMAKE_TARGET_ARCH_([a-zA-Z0-9_]+)" arch "${compiler_output}")
|
||||
# Strip out prefix
|
||||
string(REPLACE "CMAKE_TARGET_ARCH_" "" arch "${arch}")
|
||||
set(${OUTPUT_VAR} "${arch}" PARENT_SCOPE)
|
||||
endfunction()
|
Loading…
Add table
Add a link
Reference in a new issue