#################################################################################
# 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()