Skip to content

Commit

Permalink
Accept insourcesubdir builds
Browse files Browse the repository at this point in the history
Signed-off-by: Tomaz Canabrava <[email protected]>
  • Loading branch information
tcanabrava authored and dirkhh committed Dec 16, 2015
1 parent 3462da1 commit 1f960ee
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions cmake/Modules/MacroOutOfSourceBuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@
# # Ensures that we do an out of source build
MACRO(MACRO_ENSURE_OUT_OF_SOURCE_BUILD MSG)
STRING(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" insource)
GET_FILENAME_COMPONENT(PARENTDIR ${CMAKE_SOURCE_DIR} PATH)
STRING(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${PARENTDIR}" insourcesubdir)
MESSAGE( "${CMAKE_SOURCE_DIR} , ${CMAKE_BINARY_DIR}, ${PARENTDIR}")
IF(insource OR insourcesubdir)
IF(insource)
MESSAGE(FATAL_ERROR "${MSG}")
ENDIF(insource OR insourcesubdir)
ENDIF()
ENDMACRO(MACRO_ENSURE_OUT_OF_SOURCE_BUILD)

0 comments on commit 1f960ee

Please sign in to comment.