mirror of
https://github.com/Z3Prover/z3
synced 2025-07-20 03:12:03 +00:00
Add sanity check to make sure in-source CMake builds are disallowed.
This commit is contained in:
parent
32e51eda2e
commit
e8a9209577
1 changed files with 8 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue