llvm-project
18 строк · 656.0 Байт
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 )
7message( SEND_ERROR "${_errorMessage}" )
8message( FATAL_ERROR
9"In-source builds are not allowed.
10CMake would overwrite the makefiles distributed with libcxxabi.
11Please create a directory and run cmake from there, passing the path
12to this source directory as the last argument.
13This process created the file `CMakeCache.txt' and the directory `CMakeFiles'.
14Please delete them."
15)
16endif( _insource )
17
18endmacro( MACRO_ENSURE_OUT_OF_SOURCE_BUILD )
19