File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -11,17 +11,30 @@ set(CMAKE_CXX_STANDARD_REQUIRED True)
1111# Add the include directory
1212include_directories (include )
1313
14+ include (FetchContent)
15+ FetchContent_Declare(
16+ instrument_hooks_repo
17+ GIT_REPOSITORY https://github.com/CodSpeedHQ/instrument-hooks
18+ GIT_TAG b1e401a4d031ad308edb22ed59a52253a1ebe924
19+ )
20+ FetchContent_MakeAvailable(instrument_hooks_repo)
21+ FetchContent_GetProperties(instrument_hooks_repo)
22+ if (NOT instrument_hooks_repo_POPULATED)
23+ FetchContent_Populate(instrument_hooks_repo)
24+ endif ()
25+ set (instrument_hooks_SOURCE_DIR ${instrument_hooks_repo_SOURCE_DIR} )
26+
1427# Add the instrument_hooks library
1528add_library (
1629 instrument_hooks
1730 STATIC
18- instrument-hooks /dist/core.c
31+ ${instrument_hooks_SOURCE_DIR} /dist/core.c
1932)
2033
2134target_include_directories (
2235 instrument_hooks
2336 PUBLIC
24- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} /instrument-hooks /includes>
37+ $<BUILD_INTERFACE:${instrument_hooks_SOURCE_DIR} /includes>
2538 $<INSTALL_INTERFACE:includes>
2639)
2740
@@ -72,7 +85,7 @@ add_compile_definitions(CODSPEED_VERSION="${CODSPEED_VERSION}")
7285target_include_directories (
7386 codspeed
7487 PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR} /include >
75- $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR} /instrument-hooks /includes>
88+ $<BUILD_INTERFACE:${instrument_hooks_SOURCE_DIR} /includes>
7689)
7790
7891# Disable valgrind compilation errors
You can’t perform that action at this time.
0 commit comments