1# MACRO_ENSURE_OUT_OF_SOURCE_BUILD(<errorMessage>) 2 3macro( MACRO_ENSURE_OUT_OF_SOURCE_BUILD _errorMessage ) 4 5string( COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" _insource ) 6if( _insource ) 7 message( SEND_ERROR "${_errorMessage}" ) 8 message( FATAL_ERROR 9 "In-source builds are not allowed. 10 CMake would overwrite the makefiles distributed with libcxxabi. 11 Please create a directory and run cmake from there, passing the path 12 to this source directory as the last argument. 13 This process created the file `CMakeCache.txt' and the directory `CMakeFiles'. 14 Please delete them." 15 ) 16endif( _insource ) 17 18endmacro( MACRO_ENSURE_OUT_OF_SOURCE_BUILD ) 19