# This script enforces that no in source builds can be performed.
get_filename_component(srcdir "${CMAKE_SOURCE_DIR}" REALPATH)
get_filename_component(bindir "${CMAKE_BINARY_DIR}" REALPATH)
if(srcdir STREQUAL bindir)
  message("###################################################################")
  message("# In-source builds are not allowed.")
  message("# Please create a new directory and run CMake from there.")
  message("#")
  message("# IMPORTANT: You have to remove the CMakeCache.txt file and the")
  message("#            CMakeFiles directory first!")
  message("###################################################################")
  message(FATAL_ERROR "Aborting configuration")
endif()
