File tree Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Original file line number Diff line number Diff line change 1
1
cmake_minimum_required (VERSION 3.20)
2
- project (stlab-enum-ops VERSION 1.0.0 DESCRIPTION "Type-safe operators for enums" LANGUAGES CXX)
3
2
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" )
6
7
include (cmake/CPM.cmake)
7
8
8
- # Fetch cpp-library via CPM (using local path for development)
9
- CPMAddPackage(
10
-
11
- DOWNLOAD_ONLY YES
12
- )
13
- include (${cpp-library_SOURCE_DIR}/cpp-library.cmake)
9
+ # Fetch cpp-library via CPM
14
10
11
+ CPMAddPackage(
"gh:stlab/[email protected] " )
12
+ include (${cpp-library_SOURCE_DIR}/cpp-library.cmake)
15
13
16
- # Configure library (handles both lightweight and full modes automatically)
14
+ # Let cpp- library handle the project declaration and version detection
17
15
cpp_library_setup(
18
- NAME stlab-enum-ops
19
- VERSION ${PROJECT_VERSION}
20
- DESCRIPTION "${PROJECT_DESCRIPTION} "
16
+ DESCRIPTION "Type-safe operators for enums"
21
17
NAMESPACE stlab
22
18
HEADERS ${CMAKE_CURRENT_SOURCE_DIR} /include /stlab/enum_ops.hpp
23
19
EXAMPLES enum_ops_example enum_ops_example_fail
You can’t perform that action at this time.
0 commit comments