Skip to content

Commit 7c357ff

Browse files
committed
Updating to cpp-library 2.0.0
1 parent 1f6ae86 commit 7c357ff

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

CMakeLists.txt

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
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-
)
9+
# Fetch cpp-library via CPM
10+
# CPMAddPackage(
11+
# NAME cpp-library
12+
# URL "${CMAKE_SOURCE_DIR}/../cpp-library"
13+
# )
14+
CPMAddPackage("gh:stlab/[email protected]")
1315
include(${cpp-library_SOURCE_DIR}/cpp-library.cmake)
1416

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

0 commit comments

Comments
 (0)