forked from neovim/neovim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: prevent in-tree builds for the time being, as it's not supported
- Loading branch information
1 parent
1dde512
commit 53eddb8
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
function(PreventInTreeBuilds) | ||
get_filename_component(srcdir "${CMAKE_SOURCE_DIR}" REALPATH) | ||
get_filename_component(bindir "${CMAKE_BINARY_DIR}" REALPATH) | ||
|
||
if("${srcdir}" STREQUAL "${bindir}") | ||
message("") | ||
message("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!") | ||
message("Neovim doesn't support in-tree builds. It's recommended that you") | ||
message("use a build/ subdirectory:") | ||
message(" mkdir build") | ||
message(" cd build") | ||
message(" cmake <OPTIONS> ..") | ||
message("") | ||
message("Make sure to cleanup some CMake artifacts from this failed build") | ||
message("with:") | ||
message(" rm -rf CMakeFiles CMakeCache.txt") | ||
message("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!") | ||
message("") | ||
message(FATAL_ERROR "Stopping build.") | ||
endif() | ||
endfunction() | ||
|
||
PreventInTreeBuilds() |