Skip to main content

Automate setup of CMake projects

Project description

Summary:

Automate setup of CMake projects for large C & C++ projects

  • 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

Sample Usage:

Steps:

  1. Create a python script that will import AutoCMake
  2. In this file define
    1. The project name and version
    2. Directories and paths to include and exclude
    3. Compiler flags
    4. Build directory
import os

from auto_cmake_exe import AutoCMakeExe

# Configuration
cmake_config = dict()
cmake_config['proj_name'] = 'proj_name'
cmake_config['proj_dir'] = os.path.abspath(os.path.join(os.getcwd(), os.pardir))
cmake_config['version'] = '0.01'
cmake_config['cmake_version'] = '3.15'
cmake_config['exclude_folders'] = ['excluded-folder-1', 'excluded-folder-2']

# Generate CMake
cme = AutoCMakeExe(**cmake_config)
cme.run()
  1. Run the script to generate all the CMakeLists.txt files

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-2024.3.7.tar.gz (7.4 kB view hashes)

Uploaded Source

Supported by

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