CMake: disallow in-tree builds.

In-tree builds pollute the source directory and make version control
more difficult to use effectively.
This commit is contained in:
Catherine 2025-01-22 21:47:38 +00:00
parent 17943a51cb
commit 39d46395d0

View File

@ -1,3 +1,7 @@
if (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR)
message(FATAL_ERROR "In-tree builds are not supported. Instead, run:\ncmake . -B build <options> && cmake --build build")
endif()
cmake_minimum_required(VERSION 3.25)
project(nextpnr CXX)