Skip to content

Commit 56db500

Browse files
authored
Merge pull request #2 from stlab/sean-parent/auto-versioning
Auto versioning
2 parents 1f6ae86 + 536c09a commit 56db500

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

CMakeLists.txt

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,19 @@
11
cmake_minimum_required(VERSION 3.20)
2-
project(stlab-enum-ops VERSION 1.0.0 DESCRIPTION "Type-safe operators for enums" LANGUAGES CXX)
32

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

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

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

16-
# Configure library (handles both lightweight and full modes automatically)
14+
# Let cpp-library handle the project declaration and version detection
1715
cpp_library_setup(
18-
NAME stlab-enum-ops
19-
VERSION ${PROJECT_VERSION}
20-
DESCRIPTION "${PROJECT_DESCRIPTION}"
16+
DESCRIPTION "Type-safe operators for enums"
2117
NAMESPACE stlab
2218
HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/include/stlab/enum_ops.hpp
2319
EXAMPLES enum_ops_example enum_ops_example_fail

0 commit comments

Comments
 (0)