From a8e9c1fde796047126278993e0932060908ececd Mon Sep 17 00:00:00 2001 From: samelian Date: Fri, 25 Mar 2011 00:47:21 +0000 Subject: [kde-common/cmake] enforce out-of-source mode git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kde-common@1225926 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- cmake/modules/TDEMacros.cmake | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cmake/modules/TDEMacros.cmake b/cmake/modules/TDEMacros.cmake index 2c57114..9474e3c 100644 --- a/cmake/modules/TDEMacros.cmake +++ b/cmake/modules/TDEMacros.cmake @@ -1116,3 +1116,14 @@ macro( tde_setup_install_path _path _default ) set( ${_path} "${_default}" ) endif( ) endmacro( ) + + +################################################## + +if( ${CMAKE_SOURCE_DIR} MATCHES ${CMAKE_BINARY_DIR} ) + tde_message_fatal( "Please use out-of-source building, like this: + \n rm ${CMAKE_SOURCE_DIR}/CMakeCache.txt + mkdir /tmp/${PROJECT_NAME}.build + cd /tmp/${PROJECT_NAME}.build + cmake ${CMAKE_SOURCE_DIR} [arguments...]" ) +endif( ) -- cgit v1.2.1