# Update CMake/CLang/LLVM versions of a big project Mozart2 system

**URL:** https://discourse.cmake.org/t/update-cmake-clang-llvm-versions-of-a-big-project-mozart2-system/15622
**Category:** Usage
**Created:** [April 24, 2026, 7:52am UTC](https://discourse.cmake.org/t/update-cmake-clang-llvm-versions-of-a-big-project-mozart2-system/15622 "2026-04-24T07:52:48Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![matdubuisson](https://discourse.cmake.org/user_avatar/discourse.cmake.org/matdubuisson/32/6112_2.png) [@matdubuisson](https://discourse.cmake.org/u/matdubuisson)
#### Post date: [April 24, 2026, 7:52am UTC](https://discourse.cmake.org/t/update-cmake-clang-llvm-versions-of-a-big-project-mozart2-system/15622/1 "2026-04-24T07:52:48Z")

</div>

Hello everyone,

I’m improving a programing language [GitHub - mozart/mozart2: Mozart Programming System v2 · GitHub](https://github.com/mozart/mozart2) for my master thesis. The thing is it does a while no one made a real change so the build tools versions are quite old and not compatible with my machine. Instead to try using the old versions I decided to upgrade them to llvm/clang 22.1.0 and cmake \> 4.3.x and consequently with C++17 standard. They used cmake 2.8, llvm release 39 (I think 3.9.0) with C++11 standard.

When running my cmake things seem to be not too ugly :

```auto
$ mkdir build/
$ cd build/
$ CXXFLAGS=-I/usr/include/llvm cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/ -DMOZART_CACHED_BUILD=OFF -DCMAKE_POLICY_VERSION_MINIMUM=4.0 -DClang_DIR=/usr/lib/cmake/clang -DLLVM_DIR=/usr/lib/cmake/llvm ..
-- Build type: Release
CMake Warning at cmake_local/MozartProperties.cmake:39 (message):
  'git describe --dirty' did not return something sensible
Call Stack (most recent call first):
  CMakeLists.txt:17 (include)

-- Mozart unknown (Tue, 21 Apr 2026 17:30:50 +0200)
-- Building inside the source tree: 'dist' target disabled
-- Found LLVM 22.1.0
-- Using LLVMConfig.cmake in: /usr/lib/cmake/llvm
-- Found Clang using ClangConfig.cmake in: /usr/lib/cmake/clang
CMake Warning at vm/vm/test/gtest/googletest/cmake/internal_utils.cmake:225 (find_package):
  By not providing "FindPythonInterp.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "PythonInterp", but CMake did not find one.

  Could not find a package configuration file provided by "PythonInterp" with
  any of the following names:

    PythonInterp.cps
    pythoninterp.cps
    PythonInterpConfig.cmake
    pythoninterp-config.cmake

  Add the installation prefix of "PythonInterp" to CMAKE_PREFIX_PATH or set
  "PythonInterp_DIR" to a directory containing one of the above files. If
  "PythonInterp" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  vm/vm/test/gtest/googletest/CMakeLists.txt:69 (include)

-- Found GMP: /usr/include/x86_64-linux-gnu/gmp.h and /usr/lib/x86_64-linux-gnu/libgmp.a
-- Found GMP: /usr/include/x86_64-linux-gnu/gmp.h and /usr/lib/x86_64-linux-gnu/libgmp.a
-- Using emacs from: /usr/bin/emacs
-- Configuring done (0.3s)
-- Generating done (0.1s)
-- Build files have been written to: /home/matdubuisson/Desktop/mozart2/build

```

However when compiling I got an army of compilation errors concerning llvm headers and not the code of the project so I guess I’m sure my cmake config is wrong somewhere.

```auto
$ make -B gensources genboostsources VERBOSE=1
...
/usr/include/llvm/ADT/STLExtras.h:1421:15: note: deduced return type only available with ‘-std=c++14’ or ‘-std=gnu++14’
/usr/include/llvm/ADT/STLExtras.h: In function ‘auto llvm::reverse_conditionally(ContainerTy&&, bool)’:
/usr/include/llvm/ADT/STLExtras.h:1425:36: error: use of ‘auto’ in lambda parameter declaration only available with ‘-std=c++14’ or ‘-std=gnu++14’ [-Wtemplate-body]
 1425 | [ShouldReverse](auto I) -> ReferenceTy {
      | ^~~~
/usr/include/llvm/ADT/STLExtras.h: In lambda function:
/usr/include/llvm/ADT/STLExtras.h:1426:56: error: no matching function for call to ‘get<0>(int&)’ [-Wtemplate-body]
 1426 | return ShouldReverse ? std::get<0>(I) : std::get<1>(I);
      |  
...

```

From the error for example, does it mean C++17 is too new and I should go to C++14 or maybe it is possible a sub cmake is still using C++11 but I don not know if it can be the issue.

Maybe I’m wrong when reading [Clang 22.1.0 Release Notes — Clang 22.1.0 documentation](https://releases.llvm.org/22.1.0/tools/clang/docs/ReleaseNotes.html#introduction) I only see C++17 standard as the lowest one.

I’m still a beginner sorry if the questions look too simple.

Thank you in advance for your help,

Mattéo,

---

<div class="post-metadata">

### Author: ![matdubuisson](https://discourse.cmake.org/user_avatar/discourse.cmake.org/matdubuisson/32/6112_2.png) [@matdubuisson](https://discourse.cmake.org/u/matdubuisson)
#### Post date: [May 2, 2026, 6:42pm UTC](https://discourse.cmake.org/t/update-cmake-clang-llvm-versions-of-a-big-project-mozart2-system/15622/2 "2026-05-02T18:42:46Z")

</div>

Finally I proceeded every CMake instructions one by one and merged everything on mininal cmake 4.0 and C++ standard 17.
