# CMake not building module partition that builds with command lines

**URL:** https://discourse.cmake.org/t/cmake-not-building-module-partition-that-builds-with-command-lines/13758
**Category:** Code
**Created:** [March 15, 2025, 9:55pm UTC](https://discourse.cmake.org/t/cmake-not-building-module-partition-that-builds-with-command-lines/13758 "2025-03-15T21:55:19Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [February 19, 2026, 9:53pm UTC](https://discourse.cmake.org/t/cmake-not-building-module-partition-that-builds-with-command-lines/13758/7 "2026-02-19T21:53:33Z")

</div>

Another report had been made here:

> [@Building C++ modules with GCC and Clang for presentatoins](https://discourse.cmake.org/t/building-c-modules-with-gcc-and-clang-for-presentatoins/13601):
>
> I’m working on a presentation about C++ modules using CMake to build them. Here are my two CMakeLists.txt files for GCC which works fine. What changes for Clang? Any improvements on the overall CMake code so it is good for a presentation? Upper level CMakeLists.txt cmake\_minimum\_required(VERSION 3.30) project(pragmatic\_modules) if(CMAKE\_CXX\_COMPILER\_ID STREQUAL "GNU") add\_compile\_options(-std=c++23 -Werror -Wpedantic -Wall -Mmodules ) elseif(CMAKE\_CXX\_COMPILER\_ID STREQUAL…

---

_[View the full topic](https://discourse.cmake.org/t/cmake-not-building-module-partition-that-builds-with-command-lines/13758)._
