From 5f6c0322754a5e0312321b6151c6a5d9f58808e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 19 Jun 2017 12:39:38 +0200 Subject: [PATCH] CMake: enable only C++, if possible. Speeds up the configure run quite a bit, especially on Emscripten. --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 659a6b812..e96f2dacd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,7 +24,13 @@ # cmake_minimum_required(VERSION 2.8.12) -project(Magnum) + +# Configuration fails on < 3.4 if only C++ is enabled (CheckFunctionExists +# macro called from FindX11) +if(NOT CMAKE_VERSION VERSION_LESS 3.4.0) + set(LANG CXX) +endif() +project(Magnum ${LANG}) # CMake policies: enable MACOSX_RPATH by default if(POLICY CMP0042)