From 32346f28bf41f261db6ca3b27272b6660b0f3aa8 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sat, 8 Apr 2006 15:22:18 +0000 Subject: forgot to add this file :-/ Alex svn path=/trunk/KDE/kdelibs/; revision=527541 --- modules/MacroEnsureOutOfSourceBuild.cmake | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 modules/MacroEnsureOutOfSourceBuild.cmake (limited to 'modules/MacroEnsureOutOfSourceBuild.cmake') diff --git a/modules/MacroEnsureOutOfSourceBuild.cmake b/modules/MacroEnsureOutOfSourceBuild.cmake new file mode 100644 index 00000000..c2e2c862 --- /dev/null +++ b/modules/MacroEnsureOutOfSourceBuild.cmake @@ -0,0 +1,11 @@ +# - MACRO_ENSURE_OUT_OF_SOURCE_BUILD() +# MACRO_ENSURE_OUT_OF_SOURCE_BUILD() + +MACRO (MACRO_ENSURE_OUT_OF_SOURCE_BUILD _errorMessage) + + STRING(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" insource) + IF(insource) + MESSAGE(FATAL_ERROR "${_errorMessage}") + ENDIF(insource) + +ENDMACRO (MACRO_ENSURE_OUT_OF_SOURCE_BUILD) -- cgit v1.2.1 From c778596920e0d5357f216c885e35b4f97d371a23 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sat, 9 Sep 2006 10:18:35 +0000 Subject: added copyright notice everywhere. Now they all are BSD-licensed, as copyright holder I inserted everywhere the one who added it to svn (or Kitware if it is an enhanced copy from taken cmake) Some developers committed quite often but were not the ones who added the file, if you feel you have also copyright on the file add your name in the specific file. Copyright holders: CCMAIL: montel@kde.org CCMAIL: toscano.pino@tiscali.it CCMAIL: adymo@kdevelop.org CCMAIL: ranger@befunk.com CCMAIL: zack@kde.org CCMAIL: caslav.ilic@gmx.net CCMAIL: syntheticpp@yahoo.com CCMAIL: js@iidea.pl CCMAIL: michael.larouche@kdemail.net CCMAIL: ossi@kde.org CCMAIL: faure@kde.org Committers, but no files added so that they are not listed as copyright holders: CCMAIL: ch.ehrlicher@gmx.de CCMAIL: winter@kde.org CCMAIL: ralf.habacker@freenet.de CCMAIL: moura@kdewebdev.org CCMAIL: kde-buildsystem@kde.org Alex svn path=/trunk/KDE/kdelibs/; revision=582410 --- modules/MacroEnsureOutOfSourceBuild.cmake | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'modules/MacroEnsureOutOfSourceBuild.cmake') diff --git a/modules/MacroEnsureOutOfSourceBuild.cmake b/modules/MacroEnsureOutOfSourceBuild.cmake index c2e2c862..ef4d525f 100644 --- a/modules/MacroEnsureOutOfSourceBuild.cmake +++ b/modules/MacroEnsureOutOfSourceBuild.cmake @@ -1,6 +1,11 @@ # - MACRO_ENSURE_OUT_OF_SOURCE_BUILD() # MACRO_ENSURE_OUT_OF_SOURCE_BUILD() +# Copyright (c) 2006, Alexander Neundorf, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + MACRO (MACRO_ENSURE_OUT_OF_SOURCE_BUILD _errorMessage) STRING(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" insource) -- cgit v1.2.1 From 605c7c4a491fa6014e005d00e6a1d02a63aa2d51 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Thu, 14 Aug 2008 22:13:31 +0000 Subject: -add some documentation Alex svn path=/trunk/KDE/kdelibs/; revision=847189 --- modules/MacroEnsureOutOfSourceBuild.cmake | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules/MacroEnsureOutOfSourceBuild.cmake') diff --git a/modules/MacroEnsureOutOfSourceBuild.cmake b/modules/MacroEnsureOutOfSourceBuild.cmake index ef4d525f..cb26e0c3 100644 --- a/modules/MacroEnsureOutOfSourceBuild.cmake +++ b/modules/MacroEnsureOutOfSourceBuild.cmake @@ -1,5 +1,9 @@ # - MACRO_ENSURE_OUT_OF_SOURCE_BUILD() # MACRO_ENSURE_OUT_OF_SOURCE_BUILD() +# Call this macro in your project if you want to enforce out-of-source builds. +# If an in-source build is detected, it will abort with the given error message. +# This macro works in any of the CMakeLists.txt of your project, but the recommended +# location to call this is close to the beginning of the top level CMakeLists.txt # Copyright (c) 2006, Alexander Neundorf, # -- cgit v1.2.1