Skip to content

Helpful CMake modules for project management and export

License

Notifications You must be signed in to change notification settings

LecrisUT/CMakeExtraUtils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

d412a6a · Feb 5, 2024

History

85 Commits
Dec 13, 2023
Jan 10, 2024
Feb 5, 2024
Jan 2, 2024
Feb 5, 2024
Mar 13, 2023
Mar 13, 2023
May 17, 2023
Jan 10, 2024
Dec 13, 2023
Dec 13, 2023
Jan 5, 2024
Mar 31, 2023
Mar 16, 2023
Jan 10, 2024
Dec 13, 2023

Repository files navigation

CMakeExtraUtils

Extra utilities for cmake:

Installation

These utilities can be included using both find_package() and ExternalProject, e.g. if CMakeExtraUtils is already installed on your system:

cmake_minimum_required(VERSION 3.20)

find_package(CMakeExtraUtils REQUIRED)

include(DynamicVersion)
dynamic_version()

project(MyProject
        VERSION ${PROJECT_VERSION})

or if you want to download a specific version:

cmake_minimum_required(VERSION 3.20)

FetchContet_Declare(CMakeExtraUtils
        GIT_REPOSITORY https://github.com/LecriUT/CMakeExtraUtils
        GIT_TAG v0.1.1)
FetchContent_MakeAvailable(CMakeExtraUtils)

include(DynamicVersion)
dynamic_version()

project(MyProject
        VERSION ${PROJECT_VERSION})

TODO for v1.0

  • Automation:
  • Add simple pre-commit and pyproject.toml environment
  • Fix DynamicVersion to work with buildable projects
  • Test coverage:
    • DynamicVersion
    • PackageComps