mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 20:55:18 -07:00
build: prevent in-tree builds for the time being, as it's not supported
This commit is contained in:
parent
1dde512498
commit
53eddb881c
@ -8,6 +8,9 @@ endif()
|
||||
# Point CMake at any custom modules we may ship
|
||||
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
|
||||
|
||||
# We don't support building in-tree.
|
||||
include(PreventInTreeBuilds)
|
||||
|
||||
# Prefer our bundled versions of dependencies.
|
||||
set(DEPS_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/.deps/usr" CACHE PATH "Path prefix for finding dependencies")
|
||||
if(CMAKE_CROSSCOMPILING AND NOT UNIX)
|
||||
|
23
cmake/PreventInTreeBuilds.cmake
Normal file
23
cmake/PreventInTreeBuilds.cmake
Normal file
@ -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()
|
Loading…
Reference in New Issue
Block a user