Skip to content

Commit

Permalink
fixup! cmake: Add root CMakeLists.txt file
Browse files Browse the repository at this point in the history
Forbid in-source builds.
  • Loading branch information
hebasto committed Aug 8, 2024
1 parent ad2140d commit ae0d246
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
Expand Up @@ -15,6 +15,10 @@ if(POLICY CMP0141)
cmake_policy(SET CMP0141 NEW)
endif()

if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
message(FATAL_ERROR "In-source builds are not allowed.")
endif()

#=============================
# Project / Package metadata
#=============================
Expand Down

0 comments on commit ae0d246

Please sign in to comment.