Skip to content

Commit 2072e2b

Browse files
appgurueubaylesj
andauthored
Use current source / binary dir when assuring out of source builds (#1527)
Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
1 parent fdb529b commit 2072e2b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/PreventInSourceBuilds.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
# This function will prevent in-source builds
33
function(AssureOutOfSourceBuilds)
44
# make sure the user doesn't play dirty with symlinks
5-
get_filename_component(srcdir "${CMAKE_SOURCE_DIR}" REALPATH)
6-
get_filename_component(bindir "${CMAKE_BINARY_DIR}" REALPATH)
5+
get_filename_component(srcdir "${CMAKE_CURRENT_SOURCE_DIR}" REALPATH)
6+
get_filename_component(bindir "${CMAKE_CURRENT_BINARY_DIR}" REALPATH)
77

88
# disallow in-source builds
99
if("${srcdir}" STREQUAL "${bindir}")

0 commit comments

Comments
 (0)