Repository navigation
CMake function to add all subdirectories - #1002
Closed
GMNGeoffrey wants to merge 2 commits into
Closed
GMNGeoffrey wants to merge 2 commits into
GMNGeoffrey wants to merge 2 commits into
Conversation
GMNGeoffrey
marked this pull request as ready for review
March 8, 2020 07:19
GMNGeoffrey
force-pushed
the
bazel-to-cmake
branch
2 times, most recently
from
March 8, 2020 07:22
69af3cd to
6eaf527
Compare
ScottTodd
approved these changes
Mar 9, 2020
GMNGeoffrey
force-pushed
the
bazel-to-cmake
branch
from
March 9, 2020 18:05
6eaf527 to
8c38f88
Compare
GMNGeoffrey
added a commit
that referenced
this pull request
Aug 9, 2022
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rather than doing this as part of generating the files with bazel_to_cmake, we can just have each file add all its subdirectories. Only adds directories that have a CMakeLists.txt file (same as the current bazel_to_cmake logic).
Depends on #1003
This has a few advantages:
It shifts more work onto the cmake side (away from generation), however. To make sure it doesn't increase build times as a result, I tested out the comparative build times on my workstation. There is no substantial difference. Also it still runs the same number of tests (and they all pass).
Configure only:
Before:
After:
Clean build:
$ time ./build_tools/cmake/clean_build.shBefore:
After:
Rebuild (no changes):
$ time ./build_tools/cmake/rebuild.shBefore:
After:
Test
$ time ./build_tools/cmake/test.shBefore:
100% tests passed, 0 tests failed out of 211 Total Test time (real) = 4.10 sec real 0m4.140s user 0m16.732s sys 0m13.647sAfter:
100% tests passed, 0 tests failed out of 211 Total Test time (real) = 4.04 sec real 0m4.089s user 0m16.738s sys 0m13.516s