Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
wolf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile_robotics
wolf_projects
wolf_lib
wolf
Commits
9aaa42ce
Commit
9aaa42ce
authored
3 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
avoid gtest installation
parent
4d08e26f
No related branches found
No related tags found
2 merge requests
!451
After cmake and const refactor
,
!445
Resolve "Refactoring WOLF installation system"
Pipeline
#10921
canceled
3 years ago
Stage: deploy_plugins
Stage: deploy_ros
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+2
-2
2 additions, 2 deletions
CMakeLists.txt
test/CMakeLists.txt
+8
-8
8 additions, 8 deletions
test/CMakeLists.txt
test/gtest/CMakeLists.txt
+8
-3
8 additions, 3 deletions
test/gtest/CMakeLists.txt
with
18 additions
and
13 deletions
CMakeLists.txt
+
2
−
2
View file @
9aaa42ce
...
...
@@ -418,14 +418,14 @@ IF (Ceres_FOUND)
ENDIF
(
Ceres_FOUND
)
#Build tests
#===============
EXAMPLE
=========================
#========================================
IF
(
BUILD_TESTS
)
MESSAGE
(
STATUS
"Will build tests."
)
add_subdirectory
(
test
)
ENDIF
(
BUILD_TESTS
)
#Build demos
#===============
EXAMPLE
=========================
#========================================
IF
(
BUILD_DEMOS
)
MESSAGE
(
STATUS
"Will build demos."
)
ADD_SUBDIRECTORY
(
demos
)
...
...
This diff is collapsed.
Click to expand it.
test/CMakeLists.txt
+
8
−
8
View file @
9aaa42ce
...
...
@@ -32,7 +32,7 @@ wolf_add_gtest(gtest_example gtest_example.cpp) #
# BufferFrame
wolf_add_gtest
(
gtest_buffer_frame gtest_buffer_frame.cpp
)
target_link_libraries
(
gtest_buffer_frame dummy
)
target_link_libraries
(
gtest_buffer_frame
PUBLIC
dummy
)
# CaptureBase class test
wolf_add_gtest
(
gtest_capture_base gtest_capture_base.cpp
)
...
...
@@ -48,15 +48,15 @@ wolf_add_gtest(gtest_factor_autodiff gtest_factor_autodiff.cpp)
# Factory test
wolf_add_gtest
(
gtest_factory gtest_factory.cpp
)
target_link_libraries
(
gtest_factory dummy
)
target_link_libraries
(
gtest_factory
PUBLIC
dummy
)
# FactoryStateBlock factory test
wolf_add_gtest
(
gtest_factory_state_block gtest_factory_state_block.cpp
)
target_link_libraries
(
gtest_factory_state_block dummy
)
target_link_libraries
(
gtest_factory_state_block
PUBLIC
dummy
)
# Node Emplace test
wolf_add_gtest
(
gtest_emplace gtest_emplace.cpp
)
target_link_libraries
(
gtest_emplace dummy
)
target_link_libraries
(
gtest_emplace
PUBLIC
dummy
)
# FeatureBase classes test
wolf_add_gtest
(
gtest_feature_base gtest_feature_base.cpp
)
...
...
@@ -90,11 +90,11 @@ wolf_add_gtest(gtest_parser_yaml gtest_parser_yaml.cpp)
# Problem class test
wolf_add_gtest
(
gtest_problem gtest_problem.cpp
)
target_link_libraries
(
gtest_problem dummy
)
target_link_libraries
(
gtest_problem
PUBLIC
dummy
)
# ProcessorBase class test
wolf_add_gtest
(
gtest_processor_base gtest_processor_base.cpp
)
target_link_libraries
(
gtest_processor_base dummy
)
target_link_libraries
(
gtest_processor_base
PUBLIC
dummy
)
# ProcessorMotion class test
wolf_add_gtest
(
gtest_processor_motion gtest_processor_motion.cpp
)
...
...
@@ -208,11 +208,11 @@ wolf_add_gtest(gtest_processor_and_factor_pose_3d_with_extrinsics gtest_processo
# ProcessorTrackerFeatureDummy class test
wolf_add_gtest
(
gtest_processor_tracker_feature_dummy gtest_processor_tracker_feature_dummy.cpp
)
target_link_libraries
(
gtest_processor_tracker_feature_dummy dummy
)
target_link_libraries
(
gtest_processor_tracker_feature_dummy
PUBLIC
dummy
)
# ProcessorTrackerLandmarkDummy class test
wolf_add_gtest
(
gtest_processor_tracker_landmark_dummy gtest_processor_tracker_landmark_dummy.cpp
)
target_link_libraries
(
gtest_processor_tracker_landmark_dummy dummy
)
target_link_libraries
(
gtest_processor_tracker_landmark_dummy
PUBLIC
dummy
)
# SensorDiffDriveSelfcalib class test
wolf_add_gtest
(
gtest_sensor_diff_drive gtest_sensor_diff_drive.cpp
)
...
...
This diff is collapsed.
Click to expand it.
test/gtest/CMakeLists.txt
+
8
−
3
View file @
9aaa42ce
...
...
@@ -63,7 +63,12 @@ else()
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG main
)
FetchContent_MakeAvailable
(
googletest
)
#FetchContent_MakeAvailable(googletest)
FetchContent_GetProperties
(
googletest
)
if
(
NOT googletest_POPULATED
)
FetchContent_Populate
(
googletest
)
add_subdirectory
(
${
googletest_SOURCE_DIR
}
${
googletest_BINARY_DIR
}
EXCLUDE_FROM_ALL
)
endif
()
endif
()
...
...
@@ -71,10 +76,10 @@ function(wolf_add_gtest target)
add_executable
(
${
target
}
${
ARGN
}
)
if
(
${
CMAKE_VERSION
}
VERSION_LESS
"3.11.0"
)
add_dependencies
(
${
target
}
libgtest
)
target_link_libraries
(
${
target
}
libgtest
${
PLUGIN_NAME
}
)
target_link_libraries
(
${
target
}
PUBLIC
libgtest
${
PLUGIN_NAME
}
)
target_include_directories
(
${
target
}
PUBLIC
${
GTEST_INCLUDE_DIRS
}
)
else
()
target_link_libraries
(
${
target
}
gtest_main
${
PLUGIN_NAME
}
)
target_link_libraries
(
${
target
}
PUBLIC
gtest_main
${
PLUGIN_NAME
}
)
endif
()
add_test
(
NAME
${
target
}
COMMAND
${
target
}
)
endfunction
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment