Skip to content

Commit

Permalink
Don't allow in-source builds
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielMcInnes committed Jul 23, 2024
1 parent c53a528 commit 568c6a3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
# Copyright (C) 2023 Victron Energy B.V.
# See LICENSE.txt for license information.
#

if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
message(FATAL_ERROR "In-source builds are not allowed. Build artifacts such as CMakeCache.txt created in ${CMAKE_SOURCE_DIR} will cause problems for future builds. Run 'git clean -fd' in ${CMAKE_SOURCE_DIR} to continue.")
endif()

cmake_minimum_required(VERSION 3.24) # earlier versions of cmake don't handle 'qt_add_qml_module' properly, you get errors at runtime like: "qrc:/main.qml:164 ApplicationContent is not a type\n"

# CMAKE HINTS
Expand Down

0 comments on commit 568c6a3

Please sign in to comment.