From ec4dfe155657a2cb2c613f7e3629078fac42760a Mon Sep 17 00:00:00 2001 From: reuk Date: Wed, 16 Oct 2024 19:19:17 +0100 Subject: [PATCH] CMake: Warn when the C language is not enabled --- extras/Build/CMake/JUCEModuleSupport.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extras/Build/CMake/JUCEModuleSupport.cmake b/extras/Build/CMake/JUCEModuleSupport.cmake index dd4ceb9392..e89cc5dd3d 100644 --- a/extras/Build/CMake/JUCEModuleSupport.cmake +++ b/extras/Build/CMake/JUCEModuleSupport.cmake @@ -44,6 +44,10 @@ include_guard(GLOBAL) cmake_minimum_required(VERSION 3.22) +if(NOT CMAKE_C_COMPILE_OBJECT) + message(FATAL_ERROR "A C compiler is required to build JUCE. Add 'C' to your project's LANGUAGES.") +endif() + # ================================================================================================== set(JUCE_CMAKE_UTILS_DIR ${CMAKE_CURRENT_LIST_DIR}