DisabelInSource.cmake 508 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11
#################################################################################
# disable in-source builds to prevent source tree corruption.
# this REQUIRES the user to build in a seperate directory (not the project root).
#################################################################################

if(" ${CMAKE_SOURCE_DIR}" STREQUAL " ${CMAKE_BINARY_DIR}")
    message(FATAL_ERROR "
FATAL: In-source builds are not allowed.
       You should create a separate directory for build files.
")
endif()