diff options
author | samelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-03-25 00:47:21 +0000 |
---|---|---|
committer | samelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-03-25 00:47:21 +0000 |
commit | acd7af9b20453aa77612c59edc95351e0ad98869 (patch) | |
tree | ca16b4df8149fe6e617ba39bcc6e53e689f4701c | |
parent | a763e012b05f4fc07ec534bf020ee86f592397a1 (diff) | |
download | tde-cmake-acd7af9b20453aa77612c59edc95351e0ad98869.tar.gz tde-cmake-acd7af9b20453aa77612c59edc95351e0ad98869.zip |
[kde-common/cmake] enforce out-of-source mode
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kde-common/cmake@1225926 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r-- | modules/TDEMacros.cmake | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/TDEMacros.cmake b/modules/TDEMacros.cmake index 2c57114..9474e3c 100644 --- a/modules/TDEMacros.cmake +++ b/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( ) |