mirror of
https://github.com/Z3Prover/z3
synced 2025-04-07 09:55:19 +00:00
Add sanity check to make sure in-source CMake builds are disallowed.
This commit is contained in:
parent
32e51eda2e
commit
e8a9209577
|
@ -36,6 +36,14 @@ set(z3_polluted_tree_msg
|
||||||
" this with ``-n`` first to check which file(s) would be removed."
|
" this with ``-n`` first to check which file(s) would be removed."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# Sanity check - Disallow building in source
|
||||||
|
################################################################################
|
||||||
|
if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
|
||||||
|
message(FATAL_ERROR "In source builds are not allowed. You should invoke "
|
||||||
|
"CMake from a different directory.")
|
||||||
|
endif()
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Add our CMake module directory to the list of module search directories
|
# Add our CMake module directory to the list of module search directories
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
Loading…
Reference in a new issue