Warning, /frameworks/kdelibs4support/cmake/modules/MacroEnsureOutOfSourceBuild.cmake is written in an unsupported language. File is not indexed.

0001 # - MACRO_ENSURE_OUT_OF_SOURCE_BUILD(<errorMessage>)
0002 # MACRO_ENSURE_OUT_OF_SOURCE_BUILD(<errorMessage>)
0003 #    Call this macro in your project if you want to enforce out-of-source builds.
0004 #    If an in-source build is detected, it will abort with the given error message.
0005 #    This macro works in any of the CMakeLists.txt of your project, but the recommended
0006 #    location to call this is close to the beginning of the top level CMakeLists.txt
0007 
0008 # Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
0009 #
0010 # Redistribution and use is allowed according to the terms of the BSD license.
0011 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
0012 
0013 MACRO (MACRO_ENSURE_OUT_OF_SOURCE_BUILD _errorMessage)
0014 
0015    STRING(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" insource)
0016    IF(insource)
0017       MESSAGE(FATAL_ERROR "${_errorMessage}")
0018    ENDIF(insource)
0019 
0020 ENDMACRO (MACRO_ENSURE_OUT_OF_SOURCE_BUILD)