Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 9 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
cmake_minimum_required(VERSION 3.20)
project(stlab-enum-ops VERSION 1.0.0 DESCRIPTION "Type-safe operators for enums" LANGUAGES CXX)

# Setup cpp-library infrastructure
set(CPM_SOURCE_CACHE ${CMAKE_SOURCE_DIR}/.cpm-cache CACHE PATH "CPM cache" FORCE)
# Project declaration - cpp_library_setup will use this name and detect version from git tags
project(stlab-enum-ops)

set(CPM_SOURCE_CACHE ${CMAKE_SOURCE_DIR}/.cpm-cache CACHE PATH "CPM cache")
include(cmake/CPM.cmake)

# Fetch cpp-library via CPM (using local path for development)
CPMAddPackage(
URI "gh:stlab/[email protected]"
DOWNLOAD_ONLY YES
)
include(${cpp-library_SOURCE_DIR}/cpp-library.cmake)
# Fetch cpp-library via CPM

CPMAddPackage("gh:stlab/[email protected]")
include(${cpp-library_SOURCE_DIR}/cpp-library.cmake)

# Configure library (handles both lightweight and full modes automatically)
# Let cpp-library handle the project declaration and version detection
cpp_library_setup(
NAME stlab-enum-ops
VERSION ${PROJECT_VERSION}
DESCRIPTION "${PROJECT_DESCRIPTION}"
DESCRIPTION "Type-safe operators for enums"
NAMESPACE stlab
HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/include/stlab/enum_ops.hpp
EXAMPLES enum_ops_example enum_ops_example_fail
Expand Down
Loading