File tree Expand file tree Collapse file tree 4 files changed +11
-6
lines changed
ddtrace/internal/datadog/profiling Expand file tree Collapse file tree 4 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ def install_dedup_headers():
19
19
)
20
20
21
21
22
- def build_crate (crate_dir : Path , release : bool , features : list [ str ] = None ):
22
+ def build_crate (crate_dir : Path , release : bool , features : list = None ):
23
23
env = os .environ .copy ()
24
24
abs_dir = crate_dir .absolute ()
25
25
env ["CARGO_TARGET_DIR" ] = str (abs_dir / "target" )
Original file line number Diff line number Diff line change @@ -368,7 +368,7 @@ add_target() {
368
368
# Build rust dependencies
369
369
build_rust () {
370
370
echo " Building Rust dependencies"
371
- python3 ../../../../ build_libnative.py --crate ../../../. ./src/native --release --features profiling
371
+ python3 build_libnative.py --crate ./src/native --release --features profiling
372
372
}
373
373
374
374
Original file line number Diff line number Diff line change 1
1
set (SOURCE_INCLUDE_DIR ${CMAKE_SOURCE_DIR} /../../../../../src/native/target/include )
2
2
set (SOURCE_LIB_DIR ${CMAKE_SOURCE_DIR} /../../../../../src/native/target/release )
3
3
4
- set (DEST_LIB_DIR ${CMAKE_CURRENT_BINARY_DIR} /libnative )
4
+ set (DEST_LIB_DIR ${CMAKE_CURRENT_BINARY_DIR} )
5
5
set (DEST_INCLUDE_DIR ${DEST_LIB_DIR} /include )
6
- set (DEST_LIB_OUTPUT_DIR ${DEST_LIB_DIR} /lib )
6
+ set (DEST_LIB_OUTPUT_DIR ${DEST_LIB_DIR} )
7
7
8
8
file (COPY ${SOURCE_INCLUDE_DIR} DESTINATION ${DEST_LIB_DIR} )
9
9
@@ -14,7 +14,7 @@ file(COPY ${LIB_FILES} DESTINATION ${DEST_LIB_OUTPUT_DIR})
14
14
add_library (native SHARED IMPORTED )
15
15
16
16
set_target_properties (native PROPERTIES
17
- IMPORTED_LOCATION " ${DEST_LIB_OUTPUT_DIR} /libnative.so"
17
+ IMPORTED_LOCATION ${DEST_LIB_OUTPUT_DIR} /libnative.so
18
18
INTERFACE_INCLUDE_DIRECTORIES ${DEST_INCLUDE_DIR}
19
19
)
20
20
Original file line number Diff line number Diff line change
1
+ include (FetchContent )
1
2
FetchContent_Declare (
2
3
googletest
3
4
GIT_REPOSITORY https://github.com/google/googletest.git
@@ -12,6 +13,8 @@ FetchContent_MakeAvailable(googletest)
12
13
include (GoogleTest )
13
14
include (AnalysisFunc )
14
15
16
+ find_package (Python3 COMPONENTS Interpreter Development )
17
+
15
18
if (DO_VALGRIND )
16
19
find_program (
17
20
VALGRIND_EXECUTABLE
@@ -33,8 +36,10 @@ endif()
33
36
function (dd_wrapper_add_test name )
34
37
add_executable (${name} ${ARGN} )
35
38
target_include_directories (${name} PRIVATE ../include )
36
- target_link_libraries (${name} PRIVATE gmock gtest_main dd_wrapper )
39
+ #target_link_libraries(${name} PRIVATE ${Python3_LIBRARIES})
40
+ target_link_libraries (${name} PRIVATE gmock gtest_main dd_wrapper ${Python3_LIBRARIES} )
37
41
add_ddup_config (${name} )
42
+ target_link_options (${name} PRIVATE -Wl,--no-as-needed )
38
43
39
44
gtest_discover_tests (
40
45
${name}
You can’t perform that action at this time.
0 commit comments