Skip to content

Commit 286c91f

Browse files
authored
ci: remove submodule builds (#3246)
Submodules are difficult to support, and probably not a best practice, as the target names must remain different from all the targets that the user might define (CMake has a global namespace for targets).
1 parent 3b8ad44 commit 286c91f

File tree

12 files changed

+25
-116
lines changed

12 files changed

+25
-116
lines changed

README.md

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -489,27 +489,26 @@ ctest --output-on-failure
489489
You will find compiled binaries in `cmake-out\` respective to their
490490
source directories.
491491

492-
### Install
493-
494-
By default `google-cloud-cpp` downloads and compiles all its dependencies.
495-
The default configuration disables the `install` target, because the version of
496-
the dependencies downloaded by `google-cloud-cpp` may conflict with the versions
497-
already installed in your system, or with the versions you want to use for
498-
development.
499-
500-
To install `google-cloud-cpp` you must first install all its dependencies. Then
501-
you must configure `google-cloud-cpp` to find these dependencies, and install
502-
it.
503-
504-
Installing the dependencies themselves may be as simple as using the package
505-
manager for your platform, or may require manually downloading, compiling, and
506-
installing said dependencies. The [INSTALL.md](INSTALL.md) file describes how
507-
to successfully install `google-cloud-cpp` on several platforms.
508-
509-
Alternatively, if you prefer to use `google-cloud-cpp` as a submodule, you can
510-
use the CMake command
511-
[`add_subdirectory()`](https://cmake.org/cmake/help/latest/command/add_subdirectory.html)
512-
to include `google-cloud-cpp` directly in your CMake project.
492+
### Installing `google-cloud-cpp` using CMake
493+
494+
The default CMake builds for `google-cloud-cpp` assume that all the necessary
495+
dependencies are installed in your system. Installing the dependencies may be as
496+
simple as using the package manager for your platform, or may require manually
497+
downloading, compiling, and installing a number of additional libraries. The
498+
[INSTALL.md](INSTALL.md) file describes how to successfully install
499+
`google-cloud-cpp` on several platforms.
500+
501+
If installing all the dependencies is not an option for you, consider using a
502+
CMake [super build][super-build-link], an example of such can be found in the
503+
`super/` directory.
504+
505+
Alternatively, you may be able to use `google-cloud-cpp` as a git submodule of
506+
your source, and then use CMake's [`add_subdirectory()`][add-subdirectory-link]
507+
command to compile the project as part of your build. However, this is **not**
508+
a configuration that we test routinely and/or we recommend for teams working on
509+
large projects.
510+
511+
[add-subdirectory-link]: https://cmake.org/cmake/help/latest/command/add_subdirectory.html
513512

514513
## Versioning
515514

ci/kokoro/install/Dockerfile.centos-7

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,3 @@ WORKDIR /home/build/test-install-cmake-storage
206206
COPY ci/test-install/storage /home/build/test-install-cmake-storage
207207
RUN env -u PKG_CONFIG_PATH cmake -H. -B/i/storage
208208
RUN cmake --build /i/storage -- -j ${NCPU:-4}
209-
210-
WORKDIR /home/build/test-submodule
211-
COPY ci/test-install /home/build/test-submodule
212-
COPY . /home/build/test-submodule/submodule/google-cloud-cpp
213-
RUN cmake -Hsubmodule -Bcmake-out
214-
RUN cmake --build cmake-out -- -j ${NCPU:-4}

ci/kokoro/install/Dockerfile.debian-buster

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,3 @@ WORKDIR /home/build/test-install-cmake-storage
169169
COPY ci/test-install/storage /home/build/test-install-cmake-storage
170170
RUN env -u PKG_CONFIG_PATH cmake -H. -B/i/storage
171171
RUN cmake --build /i/storage -- -j ${NCPU:-4}
172-
173-
WORKDIR /home/build/test-submodule
174-
COPY ci/test-install /home/build/test-submodule
175-
COPY . /home/build/test-submodule/submodule/google-cloud-cpp
176-
RUN cmake -Hsubmodule -Bcmake-out
177-
RUN cmake --build cmake-out -- -j ${NCPU:-4}

ci/kokoro/install/Dockerfile.debian-stretch

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,3 @@ WORKDIR /home/build/test-install-cmake-storage
179179
COPY ci/test-install/storage /home/build/test-install-cmake-storage
180180
RUN env -u PKG_CONFIG_PATH cmake -H. -B/i/storage
181181
RUN cmake --build /i/storage -- -j ${NCPU:-4}
182-
183-
WORKDIR /home/build/test-submodule
184-
COPY ci/test-install /home/build/test-submodule
185-
COPY . /home/build/test-submodule/submodule/google-cloud-cpp
186-
RUN cmake -Hsubmodule -Bcmake-out
187-
RUN cmake --build cmake-out -- -j ${NCPU:-4}

ci/kokoro/install/Dockerfile.fedora

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,3 @@ WORKDIR /home/build/test-install-cmake-storage
147147
COPY ci/test-install/storage /home/build/test-install-cmake-storage
148148
RUN env -u PKG_CONFIG_PATH cmake -H. -B/i/storage
149149
RUN cmake --build /i/storage -- -j ${NCPU:-4}
150-
151-
WORKDIR /home/build/test-submodule
152-
COPY ci/test-install /home/build/test-submodule
153-
COPY . /home/build/test-submodule/submodule/google-cloud-cpp
154-
RUN cmake -Hsubmodule -Bcmake-out
155-
RUN cmake --build cmake-out -- -j ${NCPU:-4}

ci/kokoro/install/Dockerfile.opensuse-leap

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,3 @@ WORKDIR /home/build/test-install-cmake-storage
220220
COPY ci/test-install/storage /home/build/test-install-cmake-storage
221221
RUN env -u PKG_CONFIG_PATH cmake -H. -B/i/storage
222222
RUN cmake --build /i/storage -- -j ${NCPU:-4}
223-
224-
WORKDIR /home/build/test-submodule
225-
COPY ci/test-install /home/build/test-submodule
226-
COPY . /home/build/test-submodule/submodule/google-cloud-cpp
227-
RUN cmake -Hsubmodule -Bcmake-out
228-
RUN cmake --build cmake-out -- -j ${NCPU:-4}

ci/kokoro/install/Dockerfile.opensuse-tumbleweed

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,3 @@ WORKDIR /home/build/test-install-cmake-storage
142142
COPY ci/test-install/storage /home/build/test-install-cmake-storage
143143
RUN env -u PKG_CONFIG_PATH cmake -H. -B/i/storage
144144
RUN cmake --build /i/storage -- -j ${NCPU:-4}
145-
146-
WORKDIR /home/build/test-submodule
147-
COPY ci/test-install /home/build/test-submodule
148-
COPY . /home/build/test-submodule/submodule/google-cloud-cpp
149-
RUN cmake -Hsubmodule -Bcmake-out
150-
RUN cmake --build cmake-out -- -j ${NCPU:-4}

ci/kokoro/install/Dockerfile.ubuntu-bionic

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,3 @@ WORKDIR /home/build/test-install-cmake-storage
172172
COPY ci/test-install/storage /home/build/test-install-cmake-storage
173173
RUN env -u PKG_CONFIG_PATH cmake -H. -B/i/storage
174174
RUN cmake --build /i/storage -- -j ${NCPU:-4}
175-
176-
WORKDIR /home/build/test-submodule
177-
COPY ci/test-install /home/build/test-submodule
178-
COPY . /home/build/test-submodule/submodule/google-cloud-cpp
179-
RUN cmake -Hsubmodule -Bcmake-out
180-
RUN cmake --build cmake-out -- -j ${NCPU:-4}

ci/kokoro/install/Dockerfile.ubuntu-trusty

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,3 @@ WORKDIR /home/build/test-install-cmake-storage
242242
COPY ci/test-install/storage /home/build/test-install-cmake-storage
243243
RUN cmake -H. -B/i/storage -DCMAKE_FIND_ROOT_PATH="/usr/local/curl;/usr/local/ssl"
244244
RUN cmake --build /i/storage -- -j ${NCPU:-4}
245-
246-
WORKDIR /home/build/test-submodule
247-
COPY ci/test-install /home/build/test-submodule
248-
COPY . /home/build/test-submodule/submodule/google-cloud-cpp
249-
RUN cmake -Hsubmodule -Bcmake-out -DCMAKE_FIND_ROOT_PATH="/usr/local/curl;/usr/local/ssl"
250-
RUN cmake --build cmake-out -- -j ${NCPU:-4}

ci/kokoro/install/Dockerfile.ubuntu-xenial

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,3 @@ WORKDIR /home/build/test-install-cmake-storage
195195
COPY ci/test-install/storage /home/build/test-install-cmake-storage
196196
RUN env -u PKG_CONFIG_PATH cmake -H. -B/i/storage
197197
RUN cmake --build /i/storage -- -j ${NCPU:-4}
198-
199-
WORKDIR /home/build/test-submodule
200-
COPY ci/test-install /home/build/test-submodule
201-
COPY . /home/build/test-submodule/submodule/google-cloud-cpp
202-
RUN cmake -Hsubmodule -Bcmake-out
203-
RUN cmake --build cmake-out -- -j ${NCPU:-4}

0 commit comments

Comments
 (0)