Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.

Commit a2b5738

Browse files
authored
Merge pull request #226 from drwells/prevent-in-source-builds
Prevent in-source builds.
2 parents 9f2d174 + a06ffbb commit a2b5738

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
CMAKE_MINIMUM_REQUIRED(VERSION 3.15.0)
22

3+
# Do this before project() to skip the compiler config process
4+
IF("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
5+
MESSAGE(FATAL_ERROR "This project does not support in-source builds.
6+
Please create a subfolder and use `cmake ..` inside it.
7+
NOTE: cmake will now create CMakeCache.txt and CMakeFiles/*.
8+
You must delete them, or cmake will refuse to work.")
9+
ENDIF()
10+
311
# Major version of fiddle. Our convention is that X.0 is a development version
412
# and X.1, X.2, etc. are release versions.
513
SET(FDL_VERSION_MAJOR 4)

0 commit comments

Comments
 (0)