@@ -15,8 +15,6 @@ include(CTest)
1515include ("${CPP_LIBRARY_ROOT} /cmake/cpp-library-setup.cmake" )
1616include ("${CPP_LIBRARY_ROOT} /cmake/cpp-library-testing.cmake" )
1717include ("${CPP_LIBRARY_ROOT} /cmake/cpp-library-docs.cmake" )
18- include ("${CPP_LIBRARY_ROOT} /cmake/cpp-library-presets.cmake" )
19- include ("${CPP_LIBRARY_ROOT} /cmake/cpp-library-ci.cmake" )
2018
2119# Shared function to handle examples and tests consistently
2220function (_cpp_library_setup_executables)
@@ -101,9 +99,6 @@ endfunction()
10199# Main entry point function - users call this to set up their library
102100function (cpp_library_setup)
103101 # Parse arguments
104- set (options
105- FORCE_INIT # Force regeneration of template files
106- )
107102 set (oneValueArgs
108103 DESCRIPTION # Description string
109104 NAMESPACE # Namespace (e.g., "stlab")
@@ -117,10 +112,8 @@ function(cpp_library_setup)
117112 DOCS_EXCLUDE_SYMBOLS # Symbols to exclude from docs
118113 )
119114
120- cmake_parse_arguments (ARG "${options} " "${oneValueArgs} " "${multiValueArgs} " ${ARGN} )
121-
115+ cmake_parse_arguments (ARG "" "${oneValueArgs} " "${multiValueArgs} " ${ARGN} )
122116
123-
124117 # Validate required arguments
125118 if (NOT ARG_DESCRIPTION)
126119 message (FATAL_ERROR "cpp_library_setup: DESCRIPTION is required" )
@@ -143,15 +136,6 @@ function(cpp_library_setup)
143136 set (ARG_REQUIRES_CPP_VERSION 17)
144137 endif ()
145138
146- # Set default for FORCE_INIT (can be overridden via -DCPP_LIBRARY_FORCE_INIT=ON)
147- if (NOT DEFINED ARG_FORCE_INIT)
148- set (ARG_FORCE_INIT FALSE )
149- endif ()
150-
151- if (DEFINED CPP_LIBRARY_FORCE_INIT AND CPP_LIBRARY_FORCE_INIT)
152- set (ARG_FORCE_INIT TRUE )
153- endif ()
154-
155139 # Get version from git tags
156140 _cpp_library_get_git_version(GIT_VERSION)
157141 set (ARG_VERSION "${GIT_VERSION} " )
@@ -212,15 +196,8 @@ function(cpp_library_setup)
212196 )
213197 endif ()
214198
215- # Generate CMakePresets.json
216- if (ARG_FORCE_INIT)
217- _cpp_library_generate_presets(FORCE_INIT)
218- else ()
219- _cpp_library_generate_presets()
220- endif ()
221-
222- # Copy static template files (like .clang-format, .gitignore, etc.)
223- if (ARG_FORCE_INIT)
199+ # Copy static template files (like .clang-format, .gitignore, CMakePresets.json, etc.)
200+ if (DEFINED CPP_LIBRARY_FORCE_INIT AND CPP_LIBRARY_FORCE_INIT)
224201 _cpp_library_copy_templates(FORCE_INIT)
225202 else ()
226203 _cpp_library_copy_templates()
@@ -246,21 +223,7 @@ function(cpp_library_setup)
246223 )
247224 endif ()
248225
249- # Setup CI
250- if (ARG_FORCE_INIT)
251- _cpp_library_setup_ci(
252- NAME "${ARG_NAME} "
253- VERSION "${ARG_VERSION} "
254- DESCRIPTION "${ARG_DESCRIPTION} "
255- FORCE_INIT
256- )
257- else ()
258- _cpp_library_setup_ci(
259- NAME "${ARG_NAME} "
260- VERSION "${ARG_VERSION} "
261- DESCRIPTION "${ARG_DESCRIPTION} "
262- )
263- endif ()
226+
264227
265228 # Build examples if specified (only when BUILD_TESTING is enabled)
266229 if (BUILD_TESTING AND ARG_EXAMPLES)
0 commit comments