Skip to content
Snippets Groups Projects
Commit 17d3e694 authored by Emmanuel Christophe's avatar Emmanuel Christophe
Browse files

COMP: support for cmake < 2.6.4

parent 0e6c2087
No related branches found
No related tags found
No related merge requests found
#
# 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}")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment