Skip to content

Commit f4f73ed

Browse files
authored
Merge pull request #118 from ali-samer/patch-1
Update PreventInSourceBuilds.cmake to replace get_filename_component with file(REAL_PATH) for symlink resolution
2 parents 9954778 + 81aff32 commit f4f73ed

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cmake/PreventInSourceBuilds.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
#
44
function(myproject_assure_out_of_source_builds)
55
# make sure the user doesn't play dirty with symlinks
6-
get_filename_component(srcdir "${CMAKE_SOURCE_DIR}" REALPATH)
7-
get_filename_component(bindir "${CMAKE_BINARY_DIR}" REALPATH)
6+
file(REAL_PATH "${CMAKE_SOURCE_DIR}" srcdir)
7+
file(REAL_PATH "${CMAKE_BINARY_DIR}" bindir)
88

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

0 commit comments

Comments
 (0)