Home | History | Annotate | Download | only in Modules
      1 # MACRO_ENSURE_OUT_OF_SOURCE_BUILD(<errorMessage>)
      2 
      3 macro( MACRO_ENSURE_OUT_OF_SOURCE_BUILD _errorMessage )
      4 
      5 string( COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" _insource )
      6 if( _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  )
     16 endif( _insource )
     17 
     18 endmacro( MACRO_ENSURE_OUT_OF_SOURCE_BUILD )
     19