We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fdb529b commit 2072e2bCopy full SHA for 2072e2b
include/PreventInSourceBuilds.cmake
@@ -2,8 +2,8 @@
2
# This function will prevent in-source builds
3
function(AssureOutOfSourceBuilds)
4
# 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)
+ get_filename_component(srcdir "${CMAKE_CURRENT_SOURCE_DIR}" REALPATH)
+ get_filename_component(bindir "${CMAKE_CURRENT_BINARY_DIR}" REALPATH)
7
8
# disallow in-source builds
9
if("${srcdir}" STREQUAL "${bindir}")
0 commit comments