Skip to main content

Automate setup of CMake projects

Project description

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()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

auto_cmake-2025.9.1.tar.gz (9.6 kB view details)

Uploaded Source

File details

Details for the file auto_cmake-2025.9.1.tar.gz.

File metadata

  • Download URL: auto_cmake-2025.9.1.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for auto_cmake-2025.9.1.tar.gz
Algorithm Hash digest
SHA256 d96b8085eb90a1f71006805ecb49a6038010e1771d4be1c69316103e13d0d132
MD5 e467e8704a7a867fbcd4600f51fb6f83
BLAKE2b-256 02b216f865660411546e8125a137e0658b687be1707f578679a7611dd882d667

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page