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
7906e5ff
Unverified
Commit
7906e5ff
authored
Dec 24, 2019
by
Ge Jun
Committed by
GitHub
Dec 24, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1000 from zyearn/add_cmake_dependencies
add_cmake_dependencies
parents
95339cbd
328e3d05
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 @
7906e5ff
...
...
@@ -25,6 +25,7 @@ include_directories(${PROJECT_SOURCE_DIR}/src)
add_library
(
BUTIL_LIB OBJECT
${
BUTIL_SOURCES
}
)
add_library
(
SOURCES_LIB OBJECT
${
SOURCES
}
)
add_dependencies
(
SOURCES_LIB PROTO_LIB
)
# shared library needs POSITION_INDEPENDENT_CODE
set_property
(
TARGET
${
SOURCES_LIB
}
PROPERTY POSITION_INDEPENDENT_CODE 1
)
...
...
test/CMakeLists.txt
View file @
7906e5ff
...
...
@@ -191,6 +191,7 @@ endif()
add_library
(
BUTIL_DEBUG_LIB OBJECT
${
BUTIL_SOURCES
}
)
add_library
(
SOURCES_DEBUG_LIB OBJECT
${
SOURCES
}
)
add_dependencies
(
SOURCES_DEBUG_LIB PROTO_LIB
)
# shared library needs POSITION_INDEPENDENT_CODE
set_property
(
TARGET
${
BUTIL_DEBUG_LIB
}
PROPERTY POSITION_INDEPENDENT_CODE 1
)
...
...
@@ -235,8 +236,7 @@ add_test(NAME test_bvar COMMAND test_bvar)
file
(
GLOB BTHREAD_UNITTESTS
"bthread*unittest.cpp"
)
foreach
(
BTHREAD_UT
${
BTHREAD_UNITTESTS
}
)
get_filename_component
(
BTHREAD_UT_WE
${
BTHREAD_UT
}
NAME_WE
)
add_executable
(
${
BTHREAD_UT_WE
}
${
BTHREAD_UT
}
$<TARGET_OBJECTS:TEST_PROTO_LIB>
)
add_executable
(
${
BTHREAD_UT_WE
}
${
BTHREAD_UT
}
)
target_link_libraries
(
${
BTHREAD_UT_WE
}
gtest_main
brpc-shared-debug
${
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