Skip to content

Commit

Permalink
Use current source / binary dir when assuring out of source builds (#…
Browse files Browse the repository at this point in the history
…1527)

Co-authored-by: Jordan Bayles <[email protected]>
  • Loading branch information
appgurueu and baylesj authored Sep 10, 2024
1 parent fdb529b commit 2072e2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/PreventInSourceBuilds.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# 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)
get_filename_component(srcdir "${CMAKE_CURRENT_SOURCE_DIR}" REALPATH)
get_filename_component(bindir "${CMAKE_CURRENT_BINARY_DIR}" REALPATH)

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

0 comments on commit 2072e2b

Please sign in to comment.