diff --git a/CMakeLists.txt b/CMakeLists.txt index 9380f6e..8fdb214 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,10 @@ cmake_minimum_required(VERSION 3.8) project(skeleton C) +if(PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR) + message(SEND_ERROR "In-source builds are not allowed. They conflict with PHP's own Makefiles.") +endif() + add_compile_definitions(HAVE_SKELETON) set(SOURCE_FILES php_skeleton skeleton.c)