# \#cmake

**URL:** https://root-forum.cern.ch/tag/cmake/19.md

[Latest](https://root-forum.cern.ch/latest.md) · [Categories](https://root-forum.cern.ch/categories.md) · [Tags](https://root-forum.cern.ch/tags.md)

---

## [CMake Configure Error on Windows](https://root-forum.cern.ch/t/cmake-configure-error-on-windows/64985)

<div class="topic-metadata">

**Author:** [@phoenixAspies](https://root-forum.cern.ch/u/phoenixAspies)\
**Replies:** 1\
**Last updated:** [September 2, 2026, 10:09am UTC](https://root-forum.cern.ch/t/cmake-configure-error-on-windows/64985 "2026-09-02T10:09:23Z")

</div>

Hi ROOT developers, I encountered a configure-time CMake error when building ROOT 6.36.12 from source on Windows, and I believe it is a bug in the main CMakeLists.txt. Environment ·OS: Windows 11 ·Compiler: Visual St…

---

## [Are there any plans to backport the CMake 4.0.0 fixes (especially for subpackages) to earlier releases](https://root-forum.cern.ch/t/are-there-any-plans-to-backport-the-cmake-4-0-0-fixes-especially-for-subpackages-to-earlier-releases/64563)

<div class="topic-metadata">

**Author:** [@Michael\_Kelsey](https://root-forum.cern.ch/u/Michael_Kelsey)\
**Replies:** 1\
**Last updated:** [January 2, 2026, 9:27am UTC](https://root-forum.cern.ch/t/are-there-any-plans-to-backport-the-cmake-4-0-0-fixes-especially-for-subpackages-to-earlier-releases/64563 "2026-01-02T09:27:04Z")

</div>

ROOT Version: 6.30 and earlier Platform: macOS Tahoe Compiler: Apple Clang 17.0.0 CMake Version: 4.2.1 As reported in GitHub issue #18312, ROOT versions prior to 6.32.16 do not build successfully with CMake 4.0.0 o…

---

## [Example of THttpServer with exe.json usage (with ROOT\_GENERATE\_DICTIONARY)](https://root-forum.cern.ch/t/example-of-thttpserver-with-exe-json-usage-with-root-generate-dictionary/63541)

<div class="topic-metadata">

**Author:** [@jb023](https://root-forum.cern.ch/u/jb023)\
**Replies:** 18\
**Last updated:** [May 13, 2025, 3:28pm UTC](https://root-forum.cern.ch/t/example-of-thttpserver-with-exe-json-usage-with-root-generate-dictionary/63541 "2025-05-13T15:28:01Z")

</div>

Hello, I have a problem when using exe.json with a method defined in a custom class MyTObject, I always get a 404 error, for example when doing a GET request (with auth login/pwd admin / abc) on http://localhost:8080/my…

---

## [Error with Cmake while compiling](https://root-forum.cern.ch/t/error-with-cmake-while-compiling/63296)

<div class="topic-metadata">

**Author:** [@Abeda](https://root-forum.cern.ch/u/Abeda)\
**Replies:** 6\
**Last updated:** [April 6, 2025, 2:11pm UTC](https://root-forum.cern.ch/t/error-with-cmake-while-compiling/63296 "2025-04-06T14:11:12Z")

</div>

Hi everyone, I’m trying to install ROOT from source but I’m getting this error while compiling with cmake \[ 1%\] Built target gitinfotxt \[ 1%\] Built target move\_header\_core\_imt CMake Error at /Users/abedaaljarrah/root…

---

## [CMake library does not load in root macro](https://root-forum.cern.ch/t/cmake-library-does-not-load-in-root-macro/63078)

<div class="topic-metadata">

**Author:** [@nnathans](https://root-forum.cern.ch/u/nnathans)\
**Replies:** 13\
**Last updated:** [March 5, 2025, 2:51pm UTC](https://root-forum.cern.ch/t/cmake-library-does-not-load-in-root-macro/63078 "2025-03-05T14:51:59Z")

</div>

Hi, I have been trying to use ROOT in a CMake project and have come up against an issue. I have a group of custom classes in .cxx files with associated header .h files. Now I want to create a shared dynamic dictionary,…

---

## [Issue with creating TCanvas and drawing histograms](https://root-forum.cern.ch/t/issue-with-creating-tcanvas-and-drawing-histograms/63003)

<div class="topic-metadata">

**Author:** [@jbrom](https://root-forum.cern.ch/u/jbrom)\
**Replies:** 8\
**Last updated:** [March 3, 2025, 12:08pm UTC](https://root-forum.cern.ch/t/issue-with-creating-tcanvas-and-drawing-histograms/63003 "2025-03-03T12:08:43Z")

</div>

ROOT Version: 6.34.02 Platform: win64 (Windows 11) Compiler: MSVC 19.39.33521.0 I am attempting to make some mass distribution histograms of the phi meson for 4 different beam polarizations and 10 t-ranges. I have de…

---

## [Integrating incomplete system ROOT installation into CMake project issues warnings about missing files](https://root-forum.cern.ch/t/integrating-incomplete-system-root-installation-into-cmake-project-issues-warnings-about-missing-files/62938)

<div class="topic-metadata">

**Author:** [@Ako\_b](https://root-forum.cern.ch/u/Ako_b)\
**Replies:** 3\
**Last updated:** [February 14, 2025, 7:33am UTC](https://root-forum.cern.ch/t/integrating-incomplete-system-root-installation-into-cmake-project-issues-warnings-about-missing-files/62938 "2025-02-14T07:33:54Z")

</div>

Issue Hello! When configuring CMake project which uses incomplete system ROOT installation, a lot of warnings appear like this: CMake Warning at /usr/share/root/cmake/ROOTConfig-targets.cmake:1552 (message): The impo…

---

## [Module.modulemap creating problems](https://root-forum.cern.ch/t/module-modulemap-creating-problems/62607)

<div class="topic-metadata">

**Author:** [@vaubee](https://root-forum.cern.ch/u/vaubee)\
**Replies:** 3\
**Last updated:** [January 13, 2025, 8:25pm UTC](https://root-forum.cern.ch/t/module-modulemap-creating-problems/62607 "2025-01-13T20:25:32Z")

</div>

I have a project that uses cmake to compile. The CMakeLists.txt file for the project includes multiple root\_generate\_dictionary calls which generate a file called module.modulemap during the configuration step. When the…

---

## [CMake cxx\_std\_\* propagation](https://root-forum.cern.ch/t/cmake-cxx-std-propagation/62623)

<div class="topic-metadata">

**Author:** [@unmovingcastle](https://root-forum.cern.ch/u/unmovingcastle)\
**Replies:** 3\
**Last updated:** [January 10, 2025, 3:54pm UTC](https://root-forum.cern.ch/t/cmake-cxx-std-propagation/62623 "2025-01-10T15:54:27Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: 6.16+ Platform: M1 macOS with Docker Fedora 41 (personal); RHEL (Collaboration) Compiler: g++ (GCC) 14.2.1 20240912 (Red Hat 14.2.…

---

## [Problem at cmake configuration](https://root-forum.cern.ch/t/problem-at-cmake-configuration/62289)

<div class="topic-metadata">

**Author:** [@olivier-subatech](https://root-forum.cern.ch/u/olivier-subatech)\
**Replies:** 6\
**Last updated:** [November 22, 2024, 1:58pm UTC](https://root-forum.cern.ch/t/problem-at-cmake-configuration/62289 "2024-11-22T13:58:37Z")

</div>

Hi there, since I upgraded root to 6.32 a warning is thrown at cmake configuration. CMake Warning at /usr/share/root/cmake/ROOTConfig-targets.cmake:1582 (message): The imported target "ROOT::rootnb.exe" references th…

---

## [ROOT\_GENERATE\_DICTIONARY and ROOT-conda problem](https://root-forum.cern.ch/t/root-generate-dictionary-and-root-conda-problem/61924)

<div class="topic-metadata">

**Author:** [@dbaron](https://root-forum.cern.ch/u/dbaron)\
**Replies:** 3\
**Last updated:** [October 13, 2024, 11:55am UTC](https://root-forum.cern.ch/t/root-generate-dictionary-and-root-conda-problem/61924 "2024-10-13T11:55:15Z")

</div>

Dear Experts, We have a project configured with the CMakeLists.txt that I have attached to the topic. Our project uses the ROOT\_GENERATE\_DICTIONARY command and compiles without problems when I use a ROOT installation o…

---

## [ROOT\_GENERATE\_DICTIONARY() and install directive: only install .so, not .pcm and rootmap](https://root-forum.cern.ch/t/root-generate-dictionary-and-install-directive-only-install-so-not-pcm-and-rootmap/61710)

<div class="topic-metadata">

**Author:** [@YannickPatois](https://root-forum.cern.ch/u/YannickPatois)\
**Replies:** 8\
**Last updated:** [September 23, 2024, 1:01pm UTC](https://root-forum.cern.ch/t/root-generate-dictionary-and-install-directive-only-install-so-not-pcm-and-rootmap/61710 "2024-09-23T13:01:32Z")

</div>

Hi, Here a fragment of my CMakeList.txt: add\_library(THERMUS SHARED ${SRCFILES}) set\_target\_properties(THERMUS PROPERTIES PUBLIC\_HEADER "${HFILES}") target\_link\_libraries(THERMUS ${ROOT\_LIBRARIES} GSL::gsl GSL::gslcbla…

---

## [Install the custom cmake files packaged for ROOT compilation](https://root-forum.cern.ch/t/install-the-custom-cmake-files-packaged-for-root-compilation/61712)

<div class="topic-metadata">

**Author:** [@YannickPatois](https://root-forum.cern.ch/u/YannickPatois)\
**Replies:** 4\
**Last updated:** [September 23, 2024, 1:00pm UTC](https://root-forum.cern.ch/t/install-the-custom-cmake-files-packaged-for-root-compilation/61712 "2024-09-23T13:00:57Z")

</div>

Hi, For a ROOT project, I have a CMakeFile.txt, and as it needs ROOT to compile, I’m happy to do: # Check ROOT and Mathmore FIND\_PACKAGE( ROOT REQUIRED COMPONENTS MathMore ) if ( NOT ROOT\_FOUND ) message(FATAL\_ERROR "R…

---

## [Error while building ROOT from source](https://root-forum.cern.ch/t/error-while-building-root-from-source/59448)

<div class="topic-metadata">

**Author:** [@sameed](https://root-forum.cern.ch/u/sameed)\
**Replies:** 4\
**Last updated:** [May 25, 2024, 11:09pm UTC](https://root-forum.cern.ch/t/error-while-building-root-from-source/59448 "2024-05-25T23:09:05Z")

</div>

ROOT Version: 6.30.06 Platform: Ubuntu 24.04 Compiler: Not Provided In the final step of ROOT building process: cmake --build . --target install -- -j16 I got the following errors, and the build process ended with…

---

## [Getting the c++ standard if ROOT\_CXX\_STANDARD is not set](https://root-forum.cern.ch/t/getting-the-c-standard-if-root-cxx-standard-is-not-set/59439)

<div class="topic-metadata">

**Author:** [@vaubee](https://root-forum.cern.ch/u/vaubee)\
**Replies:** 1\
**Last updated:** [May 24, 2024, 11:51am UTC](https://root-forum.cern.ch/t/getting-the-c-standard-if-root-cxx-standard-is-not-set/59439 "2024-05-24T11:51:14Z")

</div>

The original topic got closed, but in case anyone else encounters this problem: If the ROOT\_CXX\_STANDARD variable is not set in cmake (ROOT versions 6.30.06 and earlier), I found the code can be used to get the c++ stan…

---

## [Managing built-in and dnf versions of XRootD in CMake project](https://root-forum.cern.ch/t/managing-built-in-and-dnf-versions-of-xrootd-in-cmake-project/59335)

<div class="topic-metadata">

**Author:** [@Ako\_b](https://root-forum.cern.ch/u/Ako_b)\
**Replies:** 5\
**Last updated:** [May 15, 2024, 8:52am UTC](https://root-forum.cern.ch/t/managing-built-in-and-dnf-versions-of-xrootd-in-cmake-project/59335 "2024-05-15T08:52:18Z")

</div>

Short description Hello! I have a problem with location of headers like XrdCl/XrdClFileSystem.hh: they are in ${ROOTSYS}/include with built-in XRootD and elsewhere with external XRootD installation. How to deal with bo…

---

## [CMake variable ROOT\_CXX\_STANDARD not set](https://root-forum.cern.ch/t/cmake-variable-root-cxx-standard-not-set/59207)

<div class="topic-metadata">

**Author:** [@vaubee](https://root-forum.cern.ch/u/vaubee)\
**Replies:** 8\
**Last updated:** [May 7, 2024, 3:32pm UTC](https://root-forum.cern.ch/t/cmake-variable-root-cxx-standard-not-set/59207 "2024-05-07T15:32:28Z")

</div>

ROOT Version: 6.08.06 - 6.30.06 Platform: Ubuntu 22.04 Compiler: gcc According to Integrating ROOT into CMake projects - ROOT "Calling find\_package(ROOT) makes the following variables available Variable Type De…

---

## [Root\_generate\_dictionary set output directory](https://root-forum.cern.ch/t/root-generate-dictionary-set-output-directory/59039)

<div class="topic-metadata">

**Author:** [@vaubee](https://root-forum.cern.ch/u/vaubee)\
**Replies:** 7\
**Last updated:** [April 26, 2024, 4:54pm UTC](https://root-forum.cern.ch/t/root-generate-dictionary-set-output-directory/59039 "2024-04-26T16:54:13Z")

</div>

Hi, I’m trying to have a project that depends on ROOT compile with cmake. I created a CMakeLists.txt file that uses root\_generate\_dictionary to create all the needed dictionaries, but I don’t want them to end up in the …

---

## [Suppress clang warnings when using ROOT as third party library with CMake](https://root-forum.cern.ch/t/suppress-clang-warnings-when-using-root-as-third-party-library-with-cmake/58905)

<div class="topic-metadata">

**Author:** [@mark1](https://root-forum.cern.ch/u/mark1)\
**Replies:** 4\
**Last updated:** [April 9, 2024, 1:21pm UTC](https://root-forum.cern.ch/t/suppress-clang-warnings-when-using-root-as-third-party-library-with-cmake/58905 "2024-04-09T13:21:58Z")

</div>

I am using ROOT as third party library in a CMake project as follows find\_package(ROOT 6.30 CONFIG REQUIRED) target\_link\_libraries(myLibrary PUBLIC ROOT::Core) target\_include\_directories(myLibrary PRIVATE ${CMAKE\_SOURC…

---

## [Bringing (part) of ROOT in a project using FetchContent?](https://root-forum.cern.ch/t/bringing-part-of-root-in-a-project-using-fetchcontent/58733)

<div class="topic-metadata">

**Author:** [@laurent.aphecetche](https://root-forum.cern.ch/u/laurent.aphecetche)\
**Replies:** 1\
**Last updated:** [March 26, 2024, 11:50am UTC](https://root-forum.cern.ch/t/bringing-part-of-root-in-a-project-using-fetchcontent/58733 "2024-03-26T11:50:28Z")

</div>

Dear all, Is it in principle possible to bring in (part of) ROOT in a CMake-based project using FetchContent ? Trying this in my dependencies.cmake file : FetchContent\_Declare(ROOT URL https://root.cern/download/ro…

---

## [How can fix cmake running on WSL error](https://root-forum.cern.ch/t/how-can-fix-cmake-running-on-wsl-error/58499)

<div class="topic-metadata">

**Author:** [@Levi](https://root-forum.cern.ch/u/Levi)\
**Replies:** 1\
**Last updated:** [March 12, 2024, 12:12pm UTC](https://root-forum.cern.ch/t/how-can-fix-cmake-running-on-wsl-error/58499 "2024-03-12T12:12:17Z")

</div>

this is my screen code working

---

## [Help building root from source openSUSE Tumbleweed](https://root-forum.cern.ch/t/help-building-root-from-source-opensuse-tumbleweed/57141)

<div class="topic-metadata">

**Author:** [@pixyl](https://root-forum.cern.ch/u/pixyl)\
**Replies:** 6\
**Last updated:** [November 17, 2023, 3:01pm UTC](https://root-forum.cern.ch/t/help-building-root-from-source-opensuse-tumbleweed/57141 "2023-11-17T15:01:06Z")

</div>

Hello, I’m trying to build root from source following the tutorial in the install section. Have to build from source cause I’m using openSUSE Tumbleweed. I’m having a problem with CMake: I have 3 folders in my home dir…

---

## [ROOT dictionary for writing ouput TTree with RDataFrame::Snapshot](https://root-forum.cern.ch/t/root-dictionary-for-writing-ouput-ttree-with-rdataframe-snapshot/55917)

<div class="topic-metadata">

**Author:** [@mtROOT](https://root-forum.cern.ch/u/mtROOT)\
**Replies:** 3\
**Last updated:** [September 26, 2023, 7:26am UTC](https://root-forum.cern.ch/t/root-dictionary-for-writing-ouput-ttree-with-rdataframe-snapshot/55917 "2023-09-26T07:26:21Z")

</div>

Hi all, I use this environment: cmake version 3.22.2 gcc version 9.3.0 (GCC) ROOT Version: 6.22/08 (for linuxx8664gcc from tags/v6-22-08@v6-22-08) Python 3.9.2 Basically, I first build (build.sh) a library with a fun…

---

## [Understanding cmake root\_generate\_dictionary](https://root-forum.cern.ch/t/understanding-cmake-root-generate-dictionary/56090)

<div class="topic-metadata">

**Author:** [@MaxNoe](https://root-forum.cern.ch/u/MaxNoe)\
**Replies:** 1\
**Last updated:** [August 22, 2023, 9:54am UTC](https://root-forum.cern.ch/t/understanding-cmake-root-generate-dictionary/56090 "2023-08-22T09:54:37Z")

</div>

Hi, I am trying to move a large, historic code-base using root from hand-written Makefiles to cmake. I am having troubles understanding how to correctly use root\_generate\_dictionary and how to properly setup the projec…

---

## [ROOT header files not found when compiling in Qt Creator](https://root-forum.cern.ch/t/root-header-files-not-found-when-compiling-in-qt-creator/55710)

<div class="topic-metadata">

**Author:** [@asarnats](https://root-forum.cern.ch/u/asarnats)\
**Replies:** 9\
**Last updated:** [July 25, 2023, 2:06pm UTC](https://root-forum.cern.ch/t/root-header-files-not-found-when-compiling-in-qt-creator/55710 "2023-07-25T14:06:55Z")

</div>

Hi all, I’m a summerstudent working on an existing code (C++) with Qt Creator. The goal is to embed a ROOT canvas within the Qt created application/program. There are two examples (similar to each other) that I’ve tried…

---

## [Cmake: root\_generate\_dictionary naming rootmap and pcm file using target output name instead of target name?](https://root-forum.cern.ch/t/cmake-root-generate-dictionary-naming-rootmap-and-pcm-file-using-target-output-name-instead-of-target-name/55114)

<div class="topic-metadata">

**Author:** [@laurent.aphecetche](https://root-forum.cern.ch/u/laurent.aphecetche)\
**Replies:** 11\
**Last updated:** [June 9, 2023, 8:10am UTC](https://root-forum.cern.ch/t/cmake-root-generate-dictionary-naming-rootmap-and-pcm-file-using-target-output-name-instead-of-target-name/55114 "2023-06-09T08:10:58Z")

</div>

Hi, Is there a way to get the CMake macro root\_generate\_dictionary to name its output files (rootmap and pcm) after the target output name (OUTPUT\_NAME target property) instead of the default/current target name itself …

---

## [Compilation error on root 6.24](https://root-forum.cern.ch/t/compilation-error-on-root-6-24/55139)

<div class="topic-metadata">

**Author:** [@zazbone](https://root-forum.cern.ch/u/zazbone)\
**Replies:** 3\
**Last updated:** [June 1, 2023, 4:57pm UTC](https://root-forum.cern.ch/t/compilation-error-on-root-6-24/55139 "2023-06-01T16:57:17Z")

</div>

Hi, I’ve developed a cmake library depending on root 6.26 which stdc++17, but I need to use it with root 6.24, so I’ve changed the stdc++ flag to stdc++14. But I’m not able to compile my library due to an error in root…

---

## [Make not working due to ROOT re-install](https://root-forum.cern.ch/t/make-not-working-due-to-root-re-install/53306)

<div class="topic-metadata">

**Author:** [@pennywise](https://root-forum.cern.ch/u/pennywise)\
**Replies:** 2\
**Last updated:** [January 27, 2023, 3:15pm UTC](https://root-forum.cern.ch/t/make-not-working-due-to-root-re-install/53306 "2023-01-27T15:15:11Z")

</div>

Hello, I am to run a script using CMake. When I do cmake, the files configure and I see this :slight\_smile: Configuring done – Generating done – Build files have been written to: /home/pennywise/mmgas/mmdata/build W…

---

## [TCanvas is not opening by giving command with root 6.26.10 in ubuntu](https://root-forum.cern.ch/t/tcanvas-is-not-opening-by-giving-command-with-root-6-26-10-in-ubuntu/53000)

<div class="topic-metadata">

**Author:** [@Pragya\_varshney](https://root-forum.cern.ch/u/Pragya_varshney)\
**Replies:** 13\
**Last updated:** [January 14, 2023, 6:46am UTC](https://root-forum.cern.ch/t/tcanvas-is-not-opening-by-giving-command-with-root-6-26-10-in-ubuntu/53000 "2023-01-14T06:46:53Z")

</div>

In root, after installing all needed packages I am facing a problem with open of canvas. When I am trying to make a histogram by the help of Ubuntu the TCanvas c1; is not opening. command is- root \[0\] TCanvas c1; root…

---

## [Error reading std::vectors of custom classes interactively with the ROOT console](https://root-forum.cern.ch/t/error-reading-std-vectors-of-custom-classes-interactively-with-the-root-console/52627)

<div class="topic-metadata">

**Author:** [@jasot](https://root-forum.cern.ch/u/jasot)\
**Replies:** 13\
**Last updated:** [December 16, 2022, 1:04am UTC](https://root-forum.cern.ch/t/error-reading-std-vectors-of-custom-classes-interactively-with-the-root-console/52627 "2022-12-16T01:04:30Z")

</div>

Dear colleagues, I have a CMake-compiled code that creates a tree of some custom classes and saves it in a ROOT file. The code works well, and the problem appears when I try to access some compiled functions interactive…

[Next page](https://root-forum.cern.ch/tag/cmake/19.md?match_all_tags=true&page=1&tags%5B%5D=cmake)
