Skip to content

Commit

Permalink
CMake: disallow in-tree builds.
Browse files Browse the repository at this point in the history
In-tree builds pollute the source directory and make version control
more difficult to use effectively.
  • Loading branch information
whitequark committed Jan 23, 2025
1 parent 90d746f commit 1623243
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)

Expand Down

0 comments on commit 1623243

Please sign in to comment.