mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-22 12:31:32 +00:00
cmake: disallow in-source builds
This commit is contained in:
parent
54bfed1bcd
commit
e265adf53f
1 changed files with 4 additions and 0 deletions
|
@ -1,5 +1,9 @@
|
||||||
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
|
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
|
||||||
|
|
||||||
|
if("${CMAKE_CURRENT_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||||
|
message(FATAL_ERROR "In-source builds are blocked. Please build from a separate directory.")
|
||||||
|
endif()
|
||||||
|
|
||||||
# Set up CMAKE path
|
# Set up CMAKE path
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue