Mercurial > projects > qtd
changeset 242:f2f4c9cbadc2
Fix #28.
You cannot build in the sources folder by default but can override this behavior using ALLOW_IN_SOURCE_BUILDS option. However, in this case you'll have to use 'cmake . && make' instead of make. Otherwise, the generator won't start.
author | SokoL_SD |
---|---|
date | Mon, 20 Jul 2009 09:33:10 +0000 |
parents | e792a5287673 |
children | e4cbe1e9ded6 |
files | CMakeLists.txt |
diffstat | 1 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/CMakeLists.txt Mon Jul 20 08:40:33 2009 +0000 +++ b/CMakeLists.txt Mon Jul 20 09:33:10 2009 +0000 @@ -6,19 +6,18 @@ ########################################################## if(NOT SECOND_RUN) -option(FORCE_IN_SOURCE_BUILD "Force the in-source building" "OFF") -if( CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR AND NOT FORCE_IN_SOURCE_BUILD) +option(ALLOW_IN_SOURCE_BUILDS "Allow in-source builds" "OFF") +if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR AND NOT ALLOW_IN_SOURCE_BUILDS) message(FATAL_ERROR "In-source builds are not allowed. Please create a directory and run cmake from there, passing the path to this source directory as the last argument. This process created the file `CMakeCache.txt` and the directory `CMakeFiles'. Please delete them. - Or you can restart cmake with `-DFORCE_IN_SOURCE_BUILD=1`, but it is not + Or you can restart cmake with `-DALLOW_IN_SOURCE_BUILDS=1`, but it is not recomended. ") -endif() - +endif(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR AND NOT ALLOW_IN_SOURCE_BUILDS) FIND_PACKAGE(Qt4 REQUIRED) set (QT_USE_QTMAIN false)