forked from tdlib/td
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GitOrigin-RevId: a774b5aa7adbeb3ba974ff55a3de52f7d6371a49
- Loading branch information
Showing
2 changed files
with
21 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
function(prevent_in_source_build) | ||
get_filename_component(REAL_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" REALPATH) | ||
get_filename_component(REAL_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}" REALPATH) | ||
|
||
if (REAL_BINARY_DIR STREQUAL REAL_SOURCE_DIR) | ||
message(" Out-of-source build must be used. Remove the files already") | ||
message(" created by CMake and rerun CMake from a new directory:") | ||
message(" rm -rf CMakeFiles CMakeCache.txt") | ||
message(" mkdir build") | ||
message(" cd build") | ||
message(" cmake ..") | ||
message(FATAL_ERROR "In-source build failed.") | ||
endif() | ||
endfunction() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters