summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsamelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-03-25 00:47:21 +0000
committersamelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-03-25 00:47:21 +0000
commita8e9c1fde796047126278993e0932060908ececd (patch)
tree43dc8295ca3d0faa614da5db984e0b5e339838c0
parent229d15f0858d72c6f22334ab513419ba79288404 (diff)
downloadother-a8e9c1fde796047126278993e0932060908ececd.tar.gz
other-a8e9c1fde796047126278993e0932060908ececd.zip
[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
-rw-r--r--cmake/modules/TDEMacros.cmake11
1 files changed, 11 insertions, 0 deletions
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( )