Skip to main content

Auto CMake

Automate setup of CMake projects for large C & C++ projects on all platforms: Windows, MacOS, Linux, Android, iOS and Bare-Metal

  • Automatically indexes .c, .h, .cpp, .hpp files and creates entries in CMakeLists.txt
  • Automatically generates CMakeLists.txt for subdirectories and create library entries in CMakeLists.txt
  • Automatically configures XCode projects with header, source and library paths
  • Automatically configures Android projects with header, source and library paths

Contents

1) auto_cmake......................Source
   1.1) resources..................CMake Toolchain Files
2) scripts ........................Deployment Scripts
3) tests...........................Unit Tests for Windows, MacOS, Linux, Android, iOS and Bare-Metal
   3.1) resources .................Sample
      3.1.1) sample_c_proj.........Generic Project to Validate Compilation on PC via Unit Tests
      3.1.2) sample_android_proj...Project to Validate Compilation on Android via Unit Tests
      3.1.3) sample_xcode_proj.....Project to Validate Compilation on iOS via Unit Tests

Sample Usage

Steps:

  1. Download auto-cmake from: https://pypi.org/project/auto-cmake/
  2. In your project define a auto cmake script (sample below)
  3. This file defines (among other things):
    1. The project name and version
    2. Directories and paths to include and exclude
    3. Compiler flags
    4. Build directory
  4. Run the script to generate the CMake project
import os
import unittest

from auto_cmake.auto_cmake_exe import AutoCMakeExe

# Source paths
proj_dir = os.path.abspath(os.path.join(os.getcwd(), "resources", "sample_c_proj"))
build_dir = os.path.abspath(os.path.join(proj_dir, "build"))

# Configuration
cmake_config = dict()
cmake_config['proj_name'] = 'sample_c_proj'
cmake_config['proj_dir'] = proj_dir
cmake_config['version'] = "2024.03.08"
cmake_config['cmake_version'] = '3.15'
cmake_config['include_dirs'] = [proj_dir]
cmake_config['libs'] = []
cmake_config['flags'] = ["FLAG_DEMO"]
cmake_config['exclude_dirs'] = []
cmake_config['exclude_paths'] = []
cmake_config['build_dir'] = build_dir

ac = AutoCMakeExe(**cmake_config)
ac.run()

Metadata

Release files for auto-cmake 2025.9.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for auto-cmake 2025.9.1
File Size Uploaded
auto_cmake-2025.9.1.tar.gz 9.6 kB Details

Release files / auto_cmake-2025.9.1.tar.gz

Download URL auto_cmake-2025.9.1.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d96b8085eb90a1f71006805ecb49a6038010e1771d4be1c69316103e13d0d132
BLAKE2b-256 checksum
How to use checksums
02b216f865660411546e8125a137e0658b687be1707f578679a7611dd882d667
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page