-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CMake] Add option to specify a dependency is test only (#192)
# Description To improve modularity and reduce dependencies, I added an option to specify that a module is a test dependency only. In this way, when building with `BUILD_TESTING=OFF` we can speed things up and reduce coupling. To showcase the improvement I updated the unit test of the `bag` module: * Remove the custom proto and instead use `dummy_type` * Make `types_proto` and `random` test only dependency
- Loading branch information
1 parent
c77e94a
commit 4832503
Showing
9 changed files
with
62 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
#================================================================================================= | ||
# ================================================================================================= | ||
# Copyright (C) 2023-2024 HEPHAESTUS Contributors | ||
#================================================================================================= | ||
|
||
define_module_proto_library(NAME bag_tests_gen_proto SOURCES test_robot_type.proto) | ||
# ================================================================================================= | ||
|
||
define_module_test( | ||
NAME tests | ||
SOURCES tests.cpp test_proto_conversion.h | ||
PUBLIC_INCLUDE_PATHS | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include> | ||
PUBLIC_LINK_LIBS hephaestus::bag_tests_gen_proto hephaestus::random) | ||
NAME tests | ||
SOURCES tests.cpp | ||
PUBLIC_INCLUDE_PATHS $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include> | ||
PUBLIC_LINK_LIBS hephaestus::random hephaestus::types_proto | ||
) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters