From 491486075dd4be9efb0322139c1d870803fd245a Mon Sep 17 00:00:00 2001 From: Duncan Ogilvie Date: Sun, 28 Nov 2021 22:18:14 +0100 Subject: [PATCH] Error when running cmkr.cmake as a script --- cmake/cmkr.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/cmkr.cmake b/cmake/cmkr.cmake index 0af2404..bc74907 100644 --- a/cmake/cmkr.cmake +++ b/cmake/cmkr.cmake @@ -1,5 +1,9 @@ include_guard() +if(CMAKE_SCRIPT_MODE_FILE) + message(FATAL_ERROR "Running cmkr.cmake as a script is unsupported. To build your project try: cmake -B build") +endif() + # Change these defaults to point to your infrastructure if desired set(CMKR_REPO "https://github.com/build-cpp/cmkr" CACHE STRING "cmkr git repository" FORCE) set(CMKR_TAG "archive_7c7144b1" CACHE STRING "cmkr git tag (this needs to be available forever)" FORCE)