A collection of CMake macros for managing compiler/linker flags, source collection, precompiled headers, and unity builds.
ucm is a collection of CMake macros that help manage compiler and linker flags, collect and organize source files, and implement precompiled headers and unity builds. It solves the problem of repetitive and error-prone CMake configuration by providing reusable, cross-platform utilities for C/C++ projects.
C/C++ developers and build engineers who use CMake and want to streamline their build configuration, especially those working on cross-platform projects with complex build requirements.
Developers choose ucm for its comprehensive set of tested macros that reduce CMake boilerplate, improve IDE integration, and enable advanced build optimizations like unity builds without manual setup.
Useful cmake macros that help with: compiler/linker flags, collecting sources, PCHs, Unity builds and other stuff.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Macros like ucm_add_flags and ucm_set_flags handle compiler and linker flags consistently across MSVC, GCC, and Clang, as demonstrated in the README's examples for different configurations.
ucm_add_dirs and ucm_add_files create filters in Visual Studio and Xcode that mimic the filesystem structure, improving navigation, with visual examples provided in the documentation.
Integrates precompiled headers via the cotire submodule and supports configurable unity builds to reduce compilation times, with options like CPP_PER_UNITY for fine-tuning source grouping.
Provides macros like ucm_remove_files and ucm_remove_directories with MATCHES patterns for dynamically managing source lists, enabling exclusions in complex projects.
Precompiled header functionality requires the optional cotire submodule, adding complexity to project setup and maintenance, as noted in the README's installation instructions.
Wrapping standard CMake commands with custom macros can obscure build logic and make debugging more challenging for developers unfamiliar with ucm's internals.
As a niche tool, ucm has fewer tutorials and community support compared to mainstream CMake modules, which could hinder troubleshooting and long-term adoption.