Commit 17d3e694 authored by Emmanuel Christophe's avatar Emmanuel Christophe

COMP: support for cmake < 2.6.4

parent 0e6c2087
#
# This function will prevent in-source builds
function(AssureOutOfSourceBuilds)
# make sure the user doesn't play dirty with symlinks
get_filename_component(srcdir "${CMAKE_SOURCE_DIR}" REALPATH)
get_filename_component(bindir "${CMAKE_BINARY_DIR}" REALPATH)
if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.6)
# make sure the user doesn't play dirty with symlinks
get_filename_component(srcdir "${CMAKE_SOURCE_DIR}" REALPATH)
get_filename_component(bindir "${CMAKE_BINARY_DIR}" REALPATH)
else()
get_filename_component(srcdir "${CMAKE_SOURCE_DIR}" ABSOLUTE)
get_filename_component(bindir "${CMAKE_BINARY_DIR}" ABSOLUTE)
endif()
# disallow in-source builds
if("${srcdir}" STREQUAL "${bindir}")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment