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