Module: kamailio Branch: master Commit: 0afea1fd170a79d3f260c18a293bac1ce8fd8527 URL: https://github.com/kamailio/kamailio/commit/0afea1fd170a79d3f260c18a293bac1c...
Author: Xenofon Karamanos xk@gilawa.com Committer: Xenofon Karamanos xk@gilawa.com Date: 2025-05-19T08:14:54Z
cmake: Forbid in-source builds
---
Modified: CMakeLists.txt
---
Diff: https://github.com/kamailio/kamailio/commit/0afea1fd170a79d3f260c18a293bac1c... Patch: https://github.com/kamailio/kamailio/commit/0afea1fd170a79d3f260c18a293bac1c...
---
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6d68b5da980..22ee9a8e3a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,17 @@ project( HOMEPAGE_URL "https://www.kamailio.org" )
+# ---- Include guards ---- + +if(PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR) + message( + FATAL_ERROR + "In-source builds not allowed. Please make a new directory (called a build directory) \ +and run CMake again accordingly.") +endif() + +# ---- Project settings ---- + # Set the version number set(EXTRAVERSION "-dev1") set(RELEASE "${PROJECT_VERSION}${EXTRAVERSION}")