-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
why does colcon build test packages even if -DBUILD_TESTING=OFF is passed #528
Comments
Setting if (BUILD_TESTING)
# Testing code
endif()
You should be able to use I'm not sure if there is a colcon flag that skips all "test_depend" dependencies without explicitly listing them, but if there isn't one that would sound like a good addition to colcon-core to me. |
Colcon's package discovery crushes down test depends to be build depends currently; it would be a pretty major design shift for colcon to begin recognizing tests more explicitly. |
I'm not sure this is accurate. Part of the issue is that not all package formats support discriminating between dependency types at all, and some just lack consistency in how to do it (looking at you, Python). For example, for packages which use colcon-core/colcon_core/package_descriptor.py Lines 74 to 75 in 64f06cf
|
@ijnek I think this is exactly what I was looking for. Another way might be to prepend if (BUILD_TESTING)
# CMakeLists content of the test package
endif() to all |
I'd like to skip building
gtest_vendor
and friends, so I do:If I explicitly remove
test_depend
from thepackage.xml
, it works as I expect<!-- <test_depend>ament_cmake_gtest</test_depend> -->
Did I miss something?
The text was updated successfully, but these errors were encountered: