mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2024-12-26 18:51:04 +08:00
Use current source / binary dir when assuring out of source builds (#1527)
Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
This commit is contained in:
parent
fdb529bd06
commit
2072e2b4e3
@ -2,8 +2,8 @@
|
|||||||
# This function will prevent in-source builds
|
# This function will prevent in-source builds
|
||||||
function(AssureOutOfSourceBuilds)
|
function(AssureOutOfSourceBuilds)
|
||||||
# make sure the user doesn't play dirty with symlinks
|
# make sure the user doesn't play dirty with symlinks
|
||||||
get_filename_component(srcdir "${CMAKE_SOURCE_DIR}" REALPATH)
|
get_filename_component(srcdir "${CMAKE_CURRENT_SOURCE_DIR}" REALPATH)
|
||||||
get_filename_component(bindir "${CMAKE_BINARY_DIR}" REALPATH)
|
get_filename_component(bindir "${CMAKE_CURRENT_BINARY_DIR}" REALPATH)
|
||||||
|
|
||||||
# disallow in-source builds
|
# disallow in-source builds
|
||||||
if("${srcdir}" STREQUAL "${bindir}")
|
if("${srcdir}" STREQUAL "${bindir}")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user