diff --git a/CMakeLists.txt b/CMakeLists.txt index 65a4150e122..b0698cae89d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,6 +105,15 @@ set(BRLCAD_CMAKE_DIR "${BRLCAD_SOURCE_DIR}/misc/CMake") list(APPEND CMAKE_MODULE_PATH "${BRLCAD_CMAKE_DIR}") +#--------------------------------------------------------------------- +# We definitely do not want a .gitattributes files present, as it is +# a potential source of subtle problems. Bail with an explanation if +# it is found to be present. +if (EXISTS "${BRLCAD_SOURCE_DIR}/.gitattributes") + message(FATAL_ERROR "\nBRL-CAD does not use a .gitattributes file in its repository. This is intended to prevent subtle errors from creeping in due to inadvertant pattern matches. See ${BRLCAD_SOURCE_DIR}/doc/git/mime_types.txt for an in-depth discussion of the recommended alternatives to use for the problems .gitattributes is intended to address.\n") +endif (EXISTS "${BRLCAD_SOURCE_DIR}/.gitattributes") + + #--------------------------------------------------------------------- # Setup and checks related to system environment settings. Some of # these impact search results needed to set default options, so we