Skip to content

Commit 8bd4c25

Browse files
IronsDuclaude
andcommitted
refactor: replace outdated FetchContent examples with in-file docs
- Delete cmake/examples/{CMakeLists.txt,FetchContent_example.cmake, FetchContent_integration_example.cpp} which used placeholder URLs and deprecated singleton API (getInstance) - Add FetchContent_Declare usage example as comments in test_fetch_content/CMakeLists.txt so users can see both add_subdirectory and FetchContent approaches in one place Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d9f60b7 commit 8bd4c25

4 files changed

Lines changed: 21 additions & 152 deletions

File tree

cmake/examples/CMakeLists.txt

Lines changed: 0 additions & 53 deletions
This file was deleted.

cmake/examples/FetchContent_example.cmake

Lines changed: 0 additions & 53 deletions
This file was deleted.

cmake/examples/FetchContent_integration_example.cpp

Lines changed: 0 additions & 43 deletions
This file was deleted.

cmake/examples/test_fetch_content/CMakeLists.txt

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,27 @@ set(REMOTE_PROFILER_BUILD_EXAMPLES OFF CACHE BOOL "")
99
set(REMOTE_PROFILER_BUILD_TESTS OFF CACHE BOOL "")
1010
set(REMOTE_PROFILER_INSTALL OFF CACHE BOOL "")
1111

12-
# Use add_subdirectory to bring in cpp-remote-profiler
13-
# This simulates what FetchContent does at configure time
14-
# SOURCE_DIR is passed by the CI test step
12+
# ============================================================================
13+
# Option A: FetchContent (recommended for real projects)
14+
# ============================================================================
15+
#
16+
# include(FetchContent)
17+
# FetchContent_Declare(
18+
# cpp-remote-profiler
19+
# GIT_REPOSITORY https://github.com/IronsDu/cpp-remote-profiler.git
20+
# GIT_TAG v0.1.0
21+
# GIT_SHALLOW TRUE
22+
# )
23+
# FetchContent_MakeAvailable(cpp-remote-profiler)
24+
#
25+
# Then link:
26+
# target_link_libraries(your_app profiler_core) # core only
27+
# target_link_libraries(your_app profiler_web) # with Drogon web UI
28+
#
29+
# ============================================================================
30+
# Option B: add_subdirectory (used below for CI testing)
31+
# ============================================================================
32+
1533
if(NOT DEFINED PROFILER_SOURCE_DIR)
1634
message(FATAL_ERROR "PROFILER_SOURCE_DIR must be set to the cpp-remote-profiler source directory")
1735
endif()

0 commit comments

Comments
 (0)