Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
brpc
Commits
328e3d05
Commit
328e3d05
authored
Dec 24, 2019
by
zhujiashun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add_cmake_dependencies
parent
95339cbd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
CMakeLists.txt
src/CMakeLists.txt
+1
-0
CMakeLists.txt
test/CMakeLists.txt
+2
-2
No files found.
src/CMakeLists.txt
View file @
328e3d05
...
@@ -25,6 +25,7 @@ include_directories(${PROJECT_SOURCE_DIR}/src)
...
@@ -25,6 +25,7 @@ include_directories(${PROJECT_SOURCE_DIR}/src)
add_library
(
BUTIL_LIB OBJECT
${
BUTIL_SOURCES
}
)
add_library
(
BUTIL_LIB OBJECT
${
BUTIL_SOURCES
}
)
add_library
(
SOURCES_LIB OBJECT
${
SOURCES
}
)
add_library
(
SOURCES_LIB OBJECT
${
SOURCES
}
)
add_dependencies
(
SOURCES_LIB PROTO_LIB
)
# shared library needs POSITION_INDEPENDENT_CODE
# shared library needs POSITION_INDEPENDENT_CODE
set_property
(
TARGET
${
SOURCES_LIB
}
PROPERTY POSITION_INDEPENDENT_CODE 1
)
set_property
(
TARGET
${
SOURCES_LIB
}
PROPERTY POSITION_INDEPENDENT_CODE 1
)
...
...
test/CMakeLists.txt
View file @
328e3d05
...
@@ -191,6 +191,7 @@ endif()
...
@@ -191,6 +191,7 @@ endif()
add_library
(
BUTIL_DEBUG_LIB OBJECT
${
BUTIL_SOURCES
}
)
add_library
(
BUTIL_DEBUG_LIB OBJECT
${
BUTIL_SOURCES
}
)
add_library
(
SOURCES_DEBUG_LIB OBJECT
${
SOURCES
}
)
add_library
(
SOURCES_DEBUG_LIB OBJECT
${
SOURCES
}
)
add_dependencies
(
SOURCES_DEBUG_LIB PROTO_LIB
)
# shared library needs POSITION_INDEPENDENT_CODE
# shared library needs POSITION_INDEPENDENT_CODE
set_property
(
TARGET
${
BUTIL_DEBUG_LIB
}
PROPERTY POSITION_INDEPENDENT_CODE 1
)
set_property
(
TARGET
${
BUTIL_DEBUG_LIB
}
PROPERTY POSITION_INDEPENDENT_CODE 1
)
...
@@ -235,8 +236,7 @@ add_test(NAME test_bvar COMMAND test_bvar)
...
@@ -235,8 +236,7 @@ add_test(NAME test_bvar COMMAND test_bvar)
file
(
GLOB BTHREAD_UNITTESTS
"bthread*unittest.cpp"
)
file
(
GLOB BTHREAD_UNITTESTS
"bthread*unittest.cpp"
)
foreach
(
BTHREAD_UT
${
BTHREAD_UNITTESTS
}
)
foreach
(
BTHREAD_UT
${
BTHREAD_UNITTESTS
}
)
get_filename_component
(
BTHREAD_UT_WE
${
BTHREAD_UT
}
NAME_WE
)
get_filename_component
(
BTHREAD_UT_WE
${
BTHREAD_UT
}
NAME_WE
)
add_executable
(
${
BTHREAD_UT_WE
}
${
BTHREAD_UT
}
add_executable
(
${
BTHREAD_UT_WE
}
${
BTHREAD_UT
}
)
$<TARGET_OBJECTS:TEST_PROTO_LIB>
)
target_link_libraries
(
${
BTHREAD_UT_WE
}
gtest_main
target_link_libraries
(
${
BTHREAD_UT_WE
}
gtest_main
brpc-shared-debug
brpc-shared-debug
${
GPERFTOOLS_LIBRARIES
}
)
${
GPERFTOOLS_LIBRARIES
}
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment